rename dmc12 inventory to cloudlorean and vault admin_password

- replace inventory/dmc12.yml with cloudlorean.yml (+ group_vars) and update
  all README/AGENTS call examples and the inventory table
- move admin_password hash into encrypted vault.yml; remove plaintext copies
  from roles/bootstrap/defaults and group_vars/external.yml
- bootstrap.yml loads vault.yml via vars_files (same pattern as monitoring)
- monitoring: PSK config/registration updates, docker role defaults,
  os-updates logging/reboot refinements, ansible.cfg/execute.sh tweaks
- add .project-wiki knowledge base and .github agent instructions
This commit is contained in:
DerLinkman
2026-09-09 14:14:18 +02:00
parent a31751af1d
commit 30f3e9a4c6
96 changed files with 3602 additions and 138 deletions
+17 -7
View File
@@ -2,8 +2,9 @@
Aktualisiert alle installierten Pakete auf Debian-Hosts, optional mit
Spiegel-Wechsel (Mirror-Switch) und Codename-Anpassung. Die Rolle führt bei
Bedarf einen Reboot durch (nur bei neuem Kernel, nicht in LXC-Containern)
und schreibt ein detailliertes Update-Log auf den Ansible-Controller.
Bedarf einen Reboot durch (nur bei neuem Kernel, nicht in LXC-Containern oder
standardmäßig auf Proxmox-Hypervisoren) und schreibt ein detailliertes
Update-Log auf den Ansible-Controller.
> Siehe auch das Playbook `playbooks/os-updates-deb.yml` (in dem direkt im
> Anschluss die `healthcheck`-Rolle läuft) sowie die
@@ -26,7 +27,7 @@ und schreibt ein detailliertes Update-Log auf den Ansible-Controller.
```
```bash
ansible-playbook -i inventory/dmc12.yml playbooks/os-updates-deb.yml
ansible-playbook -i inventory/cloudlorean.yml playbooks/os-updates-deb.yml
```
## Funktionsweise
@@ -51,9 +52,11 @@ ansible-playbook -i inventory/dmc12.yml playbooks/os-updates-deb.yml
Pakete, zeichnet Start-Zeitpunkt auf.
- `apt upgrade: full` – vollständiges Upgrade aller Pakete. Benachrichtigt
Handler `apt cleanup` und `apt autoremove`.
- `reboot.yml` – entscheidet über Reboot-Vergleich von laufendem und
installiertem Kernel, rebootet asynchron, wartet auf Wiederkehr,
erfasst Downtime. Wird in LXC-Containern übersprungen.
- `reboot.yml` – entscheidet über Reboot-Vergleich von laufendem und
installiertem Kernel, rebootet asynchron, wartet auf Wiederkehr,
erfasst Downtime. Auf Hosts in der Inventory-Gruppe `proxmox` wird der
notwendige Reboot standardmäßig nur gemeldet und nicht ausgeführt.
Wird in LXC-Containern übersprungen.
- `logging_postflight.yml` – berechnet Dauer, schreibt Log-Eintrag mit
allen Fakten in `os_update_log_file` (delegiert an localhost).
@@ -62,6 +65,12 @@ ansible-playbook -i inventory/dmc12.yml playbooks/os-updates-deb.yml
- Läuft ein älterer Kernel als installiert, gilt `reboot_required: true`.
- Der Reboot erfolgt mit `async: 1`, `poll: 0`, gefolgt von
`wait_for_connection` (Delay 10s, Timeout 600s).
- Auf Proxmox-Hypervisoren (`'proxmox' in group_names`) wird bei einem
notwendigen Reboot eine Meldung ausgegeben und `reboot_deferred: true` im
Log gesetzt. So kann der Hypervisor kontrolliert außerhalb dieses Laufs
neu gestartet werden.
- Mit `os_update_reboot_on_proxmox: true` kann der automatische Reboot für
einen Proxmox-Host explizit aktiviert werden.
- In LXC-Containern (`virtualization_type == "lxc"`) wird der gesamte
Reboot-Block übersprungen.
@@ -71,6 +80,7 @@ ansible-playbook -i inventory/dmc12.yml playbooks/os-updates-deb.yml
|-----------------------------|--------|----------------------------------------------------------|-------------------------------------------------------------|
| `os_update_auto_upgrade` | bool | `true` | (Steuer-Vorbereitung) Auto-Upgrade erlauben |
| `os_also_update_mirror` | bool | `false` | Spiegel-Wechsel und Codename-Rewrite durchführen |
| `os_update_reboot_on_proxmox` | bool | `false` | Reboot auf Hosts der Inventory-Gruppe `proxmox` zulassen; standardmäßig wird nur gemeldet |
| `os_update_logging_enabled`| bool | `true` | Update-Logging aktivieren |
| `os_update_log_dir` | string | `/ansible/logs` | Basis-Verzeichnis für Logs |
| `os_update_log_inventory` | string | `{{ inventory_file \| basename \| splitext \| first }}` | Inventory-Name (abgeleitet) |
@@ -125,4 +135,4 @@ Die Rolle vergibt keine eigenen Tags.
- **LXC**: In Containern wird der Reboot-Block komplett übersprungen
(`virtualization_type != "lxc"`).
- **Idempotenz**: `apt upgrade: full` meldet `changed`, wenn Pakete
aktualisiert wurden; ohne anstehende Updates ist der Lauf "ok".
aktualisiert wurden; ohne anstehende Updates ist der Lauf "ok".
+2 -1
View File
@@ -1,6 +1,7 @@
# Standardwerte, die überschrieben werden können
os_update_auto_upgrade: true
os_also_update_mirror: false
os_update_reboot_on_proxmox: false
# Logging of OS update runs (preflight package count/list, updated packages, duration)
os_update_logging_enabled: true
@@ -16,4 +17,4 @@ os_update_debian_codenames:
# Only these suites are considered Debian codenames and will be rewritten in sources.list.d
- trixie
- bookworm
- bullseye
- bullseye
@@ -38,9 +38,10 @@
reboot_required: {{ os_update_reboot_required }}
reboot_reason: {{ os_update_reboot_reason }}
reboot_triggered: {{ os_update_reboot_triggered }}
reboot_deferred: {{ os_update_reboot_deferred }}
reboot_started: {{ os_update_reboot_start_iso }}
reboot_downtime_seconds: {{ os_update_reboot_downtime_seconds }}
kernel_before: {{ os_update_running_kernel.stdout | default('n/a') }}
kernel_after: {{ os_update_running_kernel_after }}
delegate_to: localhost
when: os_update_logging_enabled | bool
when: os_update_logging_enabled | bool
+20 -1
View File
@@ -34,10 +34,27 @@
- name: Default reboot timing facts
set_fact:
os_update_reboot_triggered: false
os_update_reboot_deferred: false
os_update_reboot_start_iso: "n/a"
os_update_reboot_downtime_seconds: 0
os_update_running_kernel_after: "{{ os_update_running_kernel.stdout | default('n/a') }}"
- name: Notify when reboot is deferred on Proxmox
ansible.builtin.debug:
msg: "Reboot required but deferred on Proxmox host {{ ansible_facts['hostname'] }}: {{ os_update_reboot_reason }}"
when:
- os_update_reboot_required | bool
- "'proxmox' in group_names"
- not os_update_reboot_on_proxmox | bool
- name: Record deferred reboot on Proxmox
ansible.builtin.set_fact:
os_update_reboot_deferred: true
when:
- os_update_reboot_required | bool
- "'proxmox' in group_names"
- not os_update_reboot_on_proxmox | bool
- block:
- name: Reboot - Record start time
command: date -Iseconds
@@ -80,4 +97,6 @@
os_update_reboot_triggered: true
os_update_reboot_start_iso: "{{ os_update_reboot_start_iso_raw.stdout }}"
os_update_running_kernel_after: "{{ os_update_running_kernel_after_raw.stdout }}"
when: os_update_reboot_required | bool
when:
- os_update_reboot_required | bool
- "'proxmox' not in group_names or os_update_reboot_on_proxmox | bool"
@@ -5,6 +5,7 @@
apt:
upgrade: full
update_cache: yes
install_recommends: true
register: os_update_upgrade_result
notify:
- apt cleanup