Add rebooting to Ubuntu Instances

This commit is contained in:
2026-03-18 20:08:06 +00:00
parent c8dc8d4bb1
commit 5f30dc47c1
+11
View File
@@ -10,6 +10,17 @@
when: ansible_os_family == "Debian"
become: true
- name: Check if a reboot is required.
ansible.builtin.stat:
path: /var/run/reboot-required
get_checksum: no
register: reboot_required_file
when: ansible_os_family == "Debian"
- name: Reboot the server (if required).
ansible.builtin.reboot:
when: reboot_required_file.stat.exists == true
- name: "Updating and Upgrading Yum Packages"
yum:
name: '*'