feat: add become to tasks to avoid relying on ansible.cfg
All checks were successful
test / Linting (push) Successful in 34s
test / Molecule tests (default, debian12) (push) Successful in 1m0s
test / Molecule tests (default, ubuntu2004) (push) Successful in 1m27s
test / Molecule tests (default, debian11) (push) Successful in 1m36s
test / Molecule tests (default, ubuntu2204) (push) Successful in 1m3s
test / Molecule tests (with_custom_packages, debian11) (push) Successful in 1m31s
test / Molecule tests (with_custom_packages, debian12) (push) Successful in 1m45s
test / Molecule tests (with_custom_packages, ubuntu2004) (push) Successful in 1m53s
test / Molecule tests (with_custom_packages, ubuntu2204) (push) Successful in 1m44s

This commit is contained in:
Bertrand Lanson 2023-11-27 18:30:54 +01:00
parent 1f61057dfb
commit 670164494d

View File

@ -4,6 +4,7 @@
ansible.builtin.apt:
update_cache: yes
cache_valid_time: "{{ manage_apt_packages_apt_cache_time }}"
become: true
- name: "Install/remove required apt packages"
ansible.builtin.apt:
@ -14,3 +15,4 @@
when: manage_apt_packages_list is defined
and manage_apt_packages_list not in [None, '']
notify: "apt-autoremove"
become: true