full commit

This commit is contained in:
2024-08-09 06:10:31 +00:00
parent 493de10395
commit 9df9e6c1ee
+8 -2
View File
@@ -28,7 +28,7 @@
- name: Reboot the server if necessary (Debian/Ubuntu) - name: Reboot the server if necessary (Debian/Ubuntu)
reboot: reboot:
reboot_timeout: 600 reboot_timeout: 600
when: needsRestartingDebian.stdout == "1" when: ansible_facts['os_family'] == "Debian" and needsRestartingDebian.stdout == "1"
- name: Update all servers (Fedora) - name: Update all servers (Fedora)
dnf: dnf:
@@ -36,6 +36,12 @@
state: latest state: latest
when: ansible_facts['os_family'] == "RedHat" when: ansible_facts['os_family'] == "RedHat"
- name: Make sure dnf-utils is installed
dnf:
name: dnf-utils
state: present
when: ansible_facts['os_family'] == "RedHat"
- name: See if a reboot is needed (Fedora) - name: See if a reboot is needed (Fedora)
shell: "needs-restarting -r > /dev/null; echo $?" shell: "needs-restarting -r > /dev/null; echo $?"
register: needsRestartingFedora register: needsRestartingFedora
@@ -50,5 +56,5 @@
- name: Reboot the server if necessary (Fedora) - name: Reboot the server if necessary (Fedora)
reboot: reboot:
reboot_timeout: 600 reboot_timeout: 600
when: needsRestartingFedora.stdout == "1" when: ansible_facts['os_family'] == "RedHat" and needsRestartingFedora.stdout == "1"