summaryrefslogtreecommitdiffstats
path: root/roles/multilib/tasks/main.yml
blob: d5a702606d5bb4a9bfa4096bc0afcf2bd2820855 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
---
- name: "Enable multilib repository"
  become: true
  ansible.builtin.blockinfile:
    path: "/etc/pacman.conf"
    block: |
      [multilib]
      Include = /etc/pacman.d/mirrorlist
    marker: "# {mark} ANSIBLE MULTILIB"
  register: "multilib_enabled"

- name: "Update pacman cache"
  # noqa no-handler as this needs to run if the pacman configuration changes immediatly
  # otherwise, it will fail to update the mirrorlist and fail to query the info about the needed libs
  become: true
  community.general.pacman:
    update_cache: true
  when: "multilib_enabled.changed"