prepared for update printerserver

This commit is contained in:
krumel
2022-02-26 22:05:37 +01:00
parent 7adcf81c0d
commit de05b7e312
4 changed files with 65 additions and 38 deletions

24
playbooks/patches.yml Executable file
View File

@ -0,0 +1,24 @@
- hosts: all
tasks:
- name: Update Debian-based systems
block:
- name: Apt Update
apt:
update_cache: yes
- name: Apt Upgrade
apt:
upgrade: safe
- name: Check if reboot required
stat:
path: /var/run/reboot-required
register: reboot_required_file
- name: Reboot if required
reboot:
when: reboot_required_file.stat.exists == true
become: yes
when: ansible_facts['ansible_os_family'] == 'Debian'