Add become to update and reboot

This commit is contained in:
2026-03-23 20:02:20 +00:00
parent 25f115d20b
commit 52e06d1275
+2
View File
@@ -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