Ansible ins Repo migrieren und zentrale SSH-Keys in shared/ssh.
Playbooks liegen unter pve1/ansible und pve2/ansible; authorized_keys als Fragmente mit Deploy-Skript und Ziel-Matrix für Proxmox, VM 101 und CTs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
# Ansible auf pve2 — LXC Disk Maintenance
|
||||
|
||||
Wöchentliche Wartung für CTs **101 docker**, **109 media**, **110 AIDEV** per SSH vom Proxmox-Host.
|
||||
|
||||
| Pfad | Inhalt |
|
||||
|------|--------|
|
||||
| [ansible.cfg](ansible.cfg) | Defaults |
|
||||
| [inventory/hosts.yml](inventory/hosts.yml) | Hosts + CT-Variablen |
|
||||
| [inventory/group_vars/all.yml](inventory/group_vars/all.yml) | Schwellwerte |
|
||||
| [playbooks/disk-maintenance.yml](playbooks/disk-maintenance.yml) | Playbook |
|
||||
| [roles/disk_cleanup/](roles/disk_cleanup/) | Tasks (Journal, Docker, fstrim, …) |
|
||||
| [run-disk-maintenance.sh](run-disk-maintenance.sh) | Cron-Einstieg |
|
||||
|
||||
Doku: [../06_Ansible-Automatisierung.md](../06_Ansible-Automatisierung.md)
|
||||
|
||||
## Ausführen
|
||||
|
||||
```bash
|
||||
cd /root/docu/pve2/ansible # oder: /root/ansible → Symlink
|
||||
./run-disk-maintenance.sh
|
||||
# oder
|
||||
ansible-playbook playbooks/disk-maintenance.yml
|
||||
```
|
||||
|
||||
## Cron (pve2)
|
||||
|
||||
```text
|
||||
/etc/cron.weekly/pve-lxc-disk-maintenance → /root/ansible/run-disk-maintenance.sh
|
||||
```
|
||||
|
||||
Nach Symlink auf dieses Verzeichnis bleibt der Cron gültig.
|
||||
|
||||
## Deploy
|
||||
|
||||
```bash
|
||||
cd /root/docu && git pull
|
||||
ln -sfn /root/docu/pve2/ansible /root/ansible
|
||||
```
|
||||
|
||||
## SSH
|
||||
|
||||
Ansible verbindet als **root** zu den CTs — Host-Key `root@pve2` muss in CT `authorized_keys` stehen → [../../shared/ssh/README.md](../../shared/ssh/README.md).
|
||||
Reference in New Issue
Block a user