Add rebooting to Ubuntu Instances
This commit is contained in:
@@ -10,6 +10,17 @@
|
|||||||
when: ansible_os_family == "Debian"
|
when: ansible_os_family == "Debian"
|
||||||
become: true
|
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"
|
- name: "Updating and Upgrading Yum Packages"
|
||||||
yum:
|
yum:
|
||||||
name: '*'
|
name: '*'
|
||||||
|
|||||||
Reference in New Issue
Block a user