Initial Lab Setup

This commit is contained in:
2026-07-06 16:45:51 +02:00
commit 05184d778d
52 changed files with 2526 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
---
- name: Check if reboot is required
ansible.builtin.stat:
path: /var/run/reboot-required
register: reboot_required_file
- name: Perform Reboot Block
when: reboot_required_file.stat.exists
block:
- name: Handle Proxmox Guests (Endor only)
when: inventory_hostname == 'endor'
ansible.builtin.shell: "pvesh create /nodes/localhost/stopall"
failed_when: false
- name: Reboot the machine
ansible.builtin.reboot:
msg: "Reboot initiated by Ansible for updates"
reboot_timeout: 600
post_reboot_delay: 30
- name: Wait for Node Exporter to respond
ansible.builtin.wait_for:
port: 9100
host: "{{ ansible_host }}"
delay: 10
timeout: 300