From 836ecd1aabe911965ee0dd2c60624d552c50ad89 Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Wed, 18 Feb 2026 19:17:46 +0100 Subject: Refactor enable multilib on archlinux as a separate role --- roles/multilib/tasks/main.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 roles/multilib/tasks/main.yml (limited to 'roles/multilib/tasks') 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" -- cgit v1.2.3