fix: use become for dnf & apt
This commit is contained in:
parent
527056d197
commit
e815543b57
@ -1,10 +1,12 @@
|
|||||||
---
|
---
|
||||||
- name: Update Apt cache
|
- name: Update Apt cache
|
||||||
|
become: true
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
update_cache: true
|
update_cache: true
|
||||||
when: ansible_facts.os_family == 'Debian'
|
when: ansible_facts.os_family == 'Debian'
|
||||||
|
|
||||||
- name: Update DNF cache
|
- name: Update DNF cache
|
||||||
|
become: true
|
||||||
ansible.builtin.dnf:
|
ansible.builtin.dnf:
|
||||||
update_cache: true
|
update_cache: true
|
||||||
when: ansible_facts.os_family == 'RedHat'
|
when: ansible_facts.os_family == 'RedHat'
|
||||||
|
Loading…
Reference in New Issue
Block a user