diff options
Diffstat (limited to 'roles/multilib')
| -rw-r--r-- | roles/multilib/meta/argument_specs.yml | 6 | ||||
| -rw-r--r-- | roles/multilib/meta/main.yml | 11 | ||||
| -rw-r--r-- | roles/multilib/tasks/main.yml | 18 |
3 files changed, 35 insertions, 0 deletions
diff --git a/roles/multilib/meta/argument_specs.yml b/roles/multilib/meta/argument_specs.yml new file mode 100644 index 00000000..a662bdc8 --- /dev/null +++ b/roles/multilib/meta/argument_specs.yml @@ -0,0 +1,6 @@ +--- +argument_specs: + main: + short_description: "Enable multilib repo" + description: "Enable multilib repo" + options: {} diff --git a/roles/multilib/meta/main.yml b/roles/multilib/meta/main.yml new file mode 100644 index 00000000..7af9f148 --- /dev/null +++ b/roles/multilib/meta/main.yml @@ -0,0 +1,11 @@ +--- +dependencies: [] +galaxy_info: + author: "a14m" + description: "Enable multilib repo" + license: "MIT" + min_ansible_version: "2.18" + platforms: + - name: "ArchLinux" + versions: + - "all" diff --git a/roles/multilib/tasks/main.yml b/roles/multilib/tasks/main.yml new file mode 100644 index 00000000..d5a70260 --- /dev/null +++ b/roles/multilib/tasks/main.yml @@ -0,0 +1,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" |
