-
-
Notifications
You must be signed in to change notification settings - Fork 82
Expand file tree
/
Copy pathupgrade.yml
More file actions
24 lines (20 loc) · 570 Bytes
/
Copy pathupgrade.yml
File metadata and controls
24 lines (20 loc) · 570 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
---
- name: Upgrade everything on the cluster.
hosts: cluster
become: true
tasks:
- name: Upgrade all software.
ansible.builtin.apt:
update_cache: true
upgrade: dist
- name: Check if a reboot is required.
stat:
path: /var/run/reboot-required
get_checksum: false
register: reboot_required_file
- name: Reboot the server (if required).
reboot:
when: reboot_required_file.stat.exists == true
- name: Remove dependencies that are no longer required.
apt:
autoremove: true