Update test.yml

This commit is contained in:
Zakaria 2024-08-27 04:55:37 +00:00
parent 8e7a38e4ae
commit e6064b05ce

View File

@ -9,25 +9,3 @@
upgrade: dist
update_cache: yes
when: ansible_facts['os_family'] == "Debian"
- name: Make sure Zypper is installed (Debian/Ubuntu)
apt:
name: zypper
state: present
when: ansible_facts['os_family'] == "Debian"
- name: See if a reboot is needed for Ubuntu/Debian pct
shell: "needs-restarting -r > /dev/null; echo $?"
register: needsRestartingDebian
changed_when: false
when: ansible_facts['os_family'] == "Debian"
- name: Debug needsRestartingDebian
debug:
msg: "Reboot needed: {{ needsRestartingDebian.stdout }}"
when: ansible_facts['os_family'] == "Debian"
- name: Reboot the server if necessary (Debian/Ubuntu)
reboot:
reboot_timeout: 600
when: ansible_facts['os_family'] == "Debian" and needsRestartingDebian.stdout == "1"