first commit

This commit is contained in:
Kris 2024-12-30 07:40:37 +00:00
commit e433ff8833
3 changed files with 39 additions and 0 deletions

0
README.md Normal file
View File

10
inhouse/inhouse.yml Normal file
View File

@ -0,0 +1,10 @@
proxmox:
hosts:
172.22.0.3:
172.22.0.10:
zima:
hosts:
172.22.0.2:60000:
172.22.0.5:
172.22.0.6:
172.22.0.7:

29
inhouse/upgrade.yml Normal file
View File

@ -0,0 +1,29 @@
---
- name: Update Debian/Ubuntu system and reboot
hosts: all # This will target all hosts in your inventory
become: true # Use sudo privileges
tasks:
- name: Update apt cache
apt:
update_cache: yes
cache_valid_time: 3600 # Consider cache valid for 1 hour
- name: Upgrade all packages
apt:
upgrade: dist
force_apt_get: yes # Use apt-get instead of aptitude
- name: Check if reboot is required
register: reboot_required
stat:
path: /var/run/reboot-required
- name: Reboot system if required
reboot:
msg: "Rebooting system due to package updates"
connect_timeout: 5
reboot_timeout: 300
pre_reboot_delay: 0
post_reboot_delay: 30
when: reboot_required.stat.exists