5aaa7020ac
Review fixes: - Availability plays: "ping_result is succeeded" is true for unreachable hosts, so offline hosts were added to reachable_hosts and failed the next play. Test reachability explicitly (7 playbooks). - bootstrap_lxc: vim-enhanced and mtr-tiny package names, enable CRB next to EPEL, add the root key without replacing authorized_keys, validate sshd_config edits and restart sshd only on change. - backup_docker: the command module does not expand $(...); fix rsync filter order and add --exclude=*; restart only the containers that were stopped, even when rsync fails; read the storage address from the inventory; keep semaphore and semaphore-db running. - new_lxc: community.general.proxmox no longer exists, use community.proxmox; node is mini-pc; valid hostname; password or token auth; let the module pick the VMID; longer timeout. - proxmox-backup: surface the vzdump exit code, let vzdump prune with keep-last, drop the rename/prune steps that globbed *.zstd. - time-region: chrony regex no longer comments out its own server line; /etc/localtime as a symlink; reuse facts across plays. - update_pihole_blocklists: FQCN, become: true, changed_when. - ansible.cfg gathering = smart; update_system only pings ubuntu/rocky. Telegram alerts: - health_check: filesystems above disk_warn_pct (default 80), excluding efivarfs, and offline hosts. - service_check: services not running. - One message per run from localhost, credentials from Semaphore (TELEGRAM_BOT_TOKEN / TELEGRAM_CHAT_ID), no_log on the send task, prints the alert text when Telegram is not configured. Claude-Session: https://claude.ai/code/session_01XEizHawueRXUcxQELRZ8kq
64 lines
1.9 KiB
YAML
64 lines
1.9 KiB
YAML
# Homelab inventory.
|
|
#
|
|
# Group layout:
|
|
# ubuntu - Ubuntu LXC containers and VMs
|
|
# rocky - Rocky Linux 9 LXC containers
|
|
# proxmox - the Proxmox VE host
|
|
# lxc - the subset of ubuntu/rocky hosts that are LXC containers
|
|
# vms - the subset of ubuntu/rocky hosts that are QEMU VMs
|
|
#
|
|
# A host may belong to several groups. Define ansible_host once, under the OS
|
|
# group; lxc/vms list names only. Entries marked PLACEHOLDER need real values.
|
|
#
|
|
# critical_services is read by playbooks/service_check.yml.
|
|
---
|
|
all:
|
|
vars:
|
|
ansible_user: root
|
|
children:
|
|
ubuntu:
|
|
hosts:
|
|
# webserver:
|
|
# ansible_host: 192.168.55.10
|
|
# critical_services: # PLACEHOLDER: verify service names
|
|
# - nginx
|
|
docker:
|
|
ansible_host: 192.168.0.11
|
|
critical_services:
|
|
- docker
|
|
- containerd
|
|
# ubuntu-vm1: # PLACEHOLDER: first Ubuntu VM, also list under vms
|
|
# ansible_host: 192.168.2.XXX
|
|
# critical_services: []
|
|
rocky:
|
|
hosts:
|
|
courses-lxc:
|
|
ansible_host: 192.168.0.31
|
|
critical_services:
|
|
- httpd
|
|
- mariadb
|
|
pihole:
|
|
ansible_host: 192.168.0.2
|
|
critical_services:
|
|
- pihole-FTL
|
|
bot:
|
|
ansible_host: 192.168.0.174
|
|
critical_services: [myapp] # PLACEHOLDER: add the bot's service name
|
|
storage:
|
|
ansible_host: 192.168.0.115
|
|
critical_services: [smb] # PLACEHOLDER: e.g. nfs-server, smb
|
|
proxmox:
|
|
hosts:
|
|
pve:
|
|
ansible_host: 192.168.0.254 # PLACEHOLDER: verify
|
|
lxc:
|
|
hosts:
|
|
# webserver:
|
|
docker:
|
|
pihole:
|
|
bot:
|
|
storage:
|
|
vms:
|
|
hosts:
|
|
# ubuntu-vm1: # PLACEHOLDER: uncomment together with the ubuntu entry above
|