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