diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-09-13 15:39:34 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-09-13 16:17:54 +0200 |
commit | ec7691c8c0eb33ccbc2440b374c9757a194b0ac6 (patch) | |
tree | f4a03841d08dfa61ebc435f16b47d7517ae89b1d | |
parent | etckeeper: manage the ignore list (diff) | |
download | infra-ansible-ec7691c8c0eb33ccbc2440b374c9757a194b0ac6.tar.gz infra-ansible-ec7691c8c0eb33ccbc2440b374c9757a194b0ac6.zip |
pacman: add a parameter to install additional packages
-rw-r--r-- | roles/pacman/defaults/main.yml | 1 | ||||
-rw-r--r-- | roles/pacman/tasks/main.yml | 7 |
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 |