From ec7691c8c0eb33ccbc2440b374c9757a194b0ac6 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 13 Sep 2023 15:39:34 +0200 Subject: pacman: add a parameter to install additional packages --- roles/pacman/defaults/main.yml | 1 + roles/pacman/tasks/main.yml | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 roles/pacman/defaults/main.yml (limited to 'roles') diff --git a/roles/pacman/defaults/main.yml b/roles/pacman/defaults/main.yml new file mode 100644 index 0000000..85cf2fc --- /dev/null +++ b/roles/pacman/defaults/main.yml @@ -0,0 +1 @@ +pacman_packages: [] diff --git a/roles/pacman/tasks/main.yml b/roles/pacman/tasks/main.yml index a235d7d..dad1148 100644 --- a/roles/pacman/tasks/main.yml +++ b/roles/pacman/tasks/main.yml @@ -8,3 +8,10 @@ - name: Reboot if necessary ansible.builtin.meta: flush_handlers + +- name: Install packages + become: true + community.general.pacman: + name: '{{ pacman_packages }}' + state: present + when: pacman_packages | length > 0 -- cgit v1.2.3