generated from GamingChaos/ansible-repository-template
Compare commits
3 Commits
302d148015
...
36fa894031
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
36fa894031 | ||
|
|
690e7de4f2 | ||
|
|
762e6bae83 |
11
homelab
Normal file
11
homelab
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[ubuntu]
|
||||||
|
charybdis.stuyckv.local
|
||||||
|
millim.stuyckv.local
|
||||||
|
ramiris.stuyckv.local
|
||||||
|
shion.stuyckv.local
|
||||||
|
|
||||||
|
[proxmox]
|
||||||
|
rimeru.stuyckv.local
|
||||||
|
|
||||||
|
[truenas]
|
||||||
|
veldora.stuyckv.local
|
||||||
25
update-debian.yaml
Normal file
25
update-debian.yaml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
# source: https://www.jeffgeerling.com/blog/2022/ansible-playbook-upgrade-ubuntudebian-servers-and-reboot-if-needed
|
||||||
|
- hosts: ubuntu:proxmox
|
||||||
|
gather_facts: yes
|
||||||
|
become: yes
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Perform a dist-upgrade.
|
||||||
|
ansible.builtin.apt:
|
||||||
|
upgrade: dist
|
||||||
|
update_cache: yes
|
||||||
|
|
||||||
|
- name: Check if a reboot is required.
|
||||||
|
ansible.builtin.stat:
|
||||||
|
path: /var/run/reboot-required
|
||||||
|
get_checksum: no
|
||||||
|
register: reboot_required_file
|
||||||
|
|
||||||
|
- name: Reboot the server (if required).
|
||||||
|
ansible.builtin.reboot:
|
||||||
|
when: reboot_required_file.stat.exists == true
|
||||||
|
|
||||||
|
- name: Remove dependencies that are no longer required.
|
||||||
|
ansible.builtin.apt:
|
||||||
|
autoremove: yes
|
||||||
Loading…
x
Reference in New Issue
Block a user