aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-09-13 15:39:34 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-09-13 16:17:54 +0200
commitec7691c8c0eb33ccbc2440b374c9757a194b0ac6 (patch)
treef4a03841d08dfa61ebc435f16b47d7517ae89b1d
parentetckeeper: manage the ignore list (diff)
downloadinfra-ansible-ec7691c8c0eb33ccbc2440b374c9757a194b0ac6.tar.gz
infra-ansible-ec7691c8c0eb33ccbc2440b374c9757a194b0ac6.zip
pacman: add a parameter to install additional packages
Diffstat (limited to '')
-rw-r--r--roles/pacman/defaults/main.yml1
-rw-r--r--roles/pacman/tasks/main.yml7
2 files changed, 8 insertions, 0 deletions
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