update.yml hinzugefügt
This commit is contained in:
parent
69c05a39ae
commit
1d5cd9370a
24
update.yml
Normal file
24
update.yml
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
- name: Update and reboot servers
|
||||
hosts: Server
|
||||
become: true
|
||||
gather_facts: true
|
||||
|
||||
tasks:
|
||||
- name: Run apt update
|
||||
ansible.builtin.apt:
|
||||
update_cache: yes
|
||||
cache_valid_time: 3600
|
||||
|
||||
- name: Run apt upgrade (nur normale Updates)
|
||||
ansible.builtin.apt:
|
||||
upgrade: yes
|
||||
|
||||
- name: Run apt full-upgrade (inkl. Kernel, Abhängigkeiten)
|
||||
ansible.builtin.apt:
|
||||
upgrade: dist
|
||||
|
||||
- name: Reboot the server if needed
|
||||
ansible.builtin.reboot:
|
||||
msg: "Reboot initiated by Ansible after full-upgrade"
|
||||
reboot_timeout: 600
|
||||
Loading…
Reference in New Issue
Block a user