commit e433ff883342abae162deb32e4851fc77c19f51e Author: Kris Date: Mon Dec 30 07:40:37 2024 +0000 first commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/inhouse/inhouse.yml b/inhouse/inhouse.yml new file mode 100644 index 0000000..bb38fa2 --- /dev/null +++ b/inhouse/inhouse.yml @@ -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: \ No newline at end of file diff --git a/inhouse/upgrade.yml b/inhouse/upgrade.yml new file mode 100644 index 0000000..aa6b95c --- /dev/null +++ b/inhouse/upgrade.yml @@ -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 \ No newline at end of file