Add become to update and reboot
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
update_cache: yes
|
update_cache: yes
|
||||||
upgrade: safe
|
upgrade: safe
|
||||||
when: ansible_os_family == "Debian"
|
when: ansible_os_family == "Debian"
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Check if reboot is required
|
- name: Check if reboot is required
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
@@ -21,3 +22,4 @@
|
|||||||
- name: Reboot if required
|
- name: Reboot if required
|
||||||
ansible.builtin.reboot:
|
ansible.builtin.reboot:
|
||||||
when: reboot_required_file is defined and reboot_required_file.stat.exists
|
when: reboot_required_file is defined and reboot_required_file.stat.exists
|
||||||
|
become: true
|
||||||
|
|||||||
Reference in New Issue
Block a user