Commit Graph

42 Commits

Author SHA1 Message Date
Harwinder Sekhon 342186c463 Add comments and pending-update reporting to auto_updates.yml
Documents each play/task, and adds per-host and final summary output
showing how many packages are pending on each host.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-19 19:31:59 -04:00
Harwinder Sekhon 4c0fe58c01 Telegram alerts: accept credentials from extra vars or environment, report which is missing
Semaphore variable groups can pass values as extra vars or as environment
variables, and secrets can be either type. Read telegram_bot_token,
TELEGRAM_BOT_TOKEN (extra var) or TELEGRAM_BOT_TOKEN (env), same for the
chat id, and say in the "not configured" message which of the two is
missing so a wrong box or a detached variable group is visible in the log.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XEizHawueRXUcxQELRZ8kq
2026-09-06 23:15:11 -04:00
Harwinder Sekhon 006103760f Fix playbook bugs from review, add Telegram alerts to health and service checks
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.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XEizHawueRXUcxQELRZ8kq
2026-09-06 23:06:18 -04:00
Harwinder Sekhon 6f2cc4a9a5 discover_guests: treat any 192.168.x address as LAN, the lab now spans several subnets
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JEczyvRjfakkiDNkbZA7PR
2026-09-06 20:30:10 -04:00
Harwinder Sekhon a9112ae5b5 Add discover_guests playbook and README with Semaphore scheduling guide
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JEczyvRjfakkiDNkbZA7PR
2026-09-06 20:30:10 -04:00
Harwinder Sekhon 7ff69de8c4 Add guest playbooks: ssh hardening, reboot check, auto updates, service check, guest agent, admin user
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JEczyvRjfakkiDNkbZA7PR
2026-09-06 20:30:10 -04:00
Harwinder Sekhon 3f4b067014 Add repo foundation: proxmox/lxc/vms groups, ansible.cfg, collections, lint configs
- inventory: add proxmox host, lxc and vms groups, critical_services per host
- retarget bootstrap and time-region to ubuntu:rocky so the Proxmox host is untouched
- add ansible.cfg, collections/requirements.yml, .gitignore, .yamllint, .ansible-lint
- remove stale root new_lxc.yml duplicate and the Nextcloud upgrade playbook

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JEczyvRjfakkiDNkbZA7PR
2026-09-06 20:30:10 -04:00
harwinder 017b415d6a Fix health check: RAM formula, exclude snap/overlay, use ASCII output
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-16 17:38:45 -04:00
harwinder ee4c3b106d Add disk and RAM health check playbook
Reports disk usage, memory, and swap per host with warnings
for partitions exceeding 85% usage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-16 17:34:36 -04:00
harwinder bec4eeb7c9 Refactor inventory into OS groups and update playbooks accordingly
Group hosts by OS (ubuntu/rocky) in inventory, refactor playbooks to
use group-targeted plays instead of ansible_os_family conditionals,
add bot host, and add Docker volume backup playbook via rsync to storage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-16 17:31:29 -04:00
harry 1ac7768c33 Update playbooks/update_system.yml 2026-04-22 23:31:50 +00:00
harry 1c0e633cad Update playbooks/update_system.yml 2026-04-22 23:29:06 +00:00
harry 42867dfb3c Update playbooks/bootstrap_lxc.yml 2026-04-10 15:35:39 +00:00
harry 9d940ca000 Update playbooks/new_lxc.yml 2026-04-10 15:21:40 +00:00
harry 8c3c3a9d4e Add playbooks/new_lxc.yml 2026-04-10 15:19:50 +00:00
harry 672ac4fc6c Update playbooks/time-region.yml 2026-04-02 21:04:41 +00:00
harry 76d8329558 Update playbooks/time-region.yml 2026-04-02 21:03:53 +00:00
harry 416e6a3142 Update playbooks/time-region.yml 2026-04-02 20:59:41 +00:00
harry 424e77c749 Update playbooks/update_system.yml 2026-03-14 04:28:44 +00:00
harry 03cd038508 Update playbooks/add_root_key.yml 2026-02-28 10:08:32 +00:00
harry bca1478ac7 Add playbooks/add_root_key.yml 2026-02-28 10:07:36 +00:00
harry 7b62a4efb8 Update playbooks/nextcloud-upgrade.yml 2025-11-27 15:59:26 +00:00
harry 911b2993e5 Update playbooks/nextcloud-upgrade.yml 2025-11-27 15:57:02 +00:00
harry b7d041f72e Update playbooks/nextcloud-upgrade.yml 2025-11-27 15:48:12 +00:00
harry f1851afe9a Update playbooks/nextcloud-upgrade.yml 2025-11-27 15:46:58 +00:00
harry 3a5713b18f Update playbooks/time-region.yml 2025-11-15 06:34:42 +00:00
harry a2068ae8cb Update playbooks/time-region-ntp.yml 2025-11-15 06:34:30 +00:00
harry 114d5632d3 Update playbooks/time-region-ntp.yml 2025-11-15 05:09:00 +00:00
harry d6d422d470 Update playbooks/time-region-ntp.yml 2025-11-15 05:07:59 +00:00
harry d8f2c77f01 Update playbooks/time-region-ntp.yml 2025-11-15 05:06:43 +00:00
harry b96bfe5118 Add playbooks/time-region-ntp.yml 2025-11-15 05:03:53 +00:00
harry 901587ce6c Update playbooks/nextcloud-upgrade.yml 2025-11-14 13:24:32 +00:00
harry 8b7fe77677 Update playbooks/nextcloud-upgrade.yml 2025-11-14 13:22:35 +00:00
harry e47ab0e538 Update playbooks/nextcloud-upgrade.yml 2025-11-14 13:09:01 +00:00
harry 9431e69a1b Update playbooks/nextcloud-upgrade.yml 2025-11-14 13:05:02 +00:00
harry 3ef59c8bf3 updated from gemini 2025-11-14 13:00:53 +00:00
harry b6262f1a01 Update playbooks/nextcloud-upgrade.yml 2025-11-13 14:13:31 +00:00
harry 0fc81e0d6c Update playbooks/nextcloud-upgrade.yml 2025-11-13 14:10:52 +00:00
harry 9cea0f9684 Update playbooks/nextcloud-upgrade.yml 2025-11-13 14:10:20 +00:00
harry dfc84ca76e Add playbooks/nextcloud-upgrade.yml 2025-11-13 14:06:03 +00:00
harry ea8060ab8a Update playbooks/update_pihole_blocklists.yml 2025-11-13 04:55:57 +00:00
harry fd518f7460 Upload files to "playbooks" 2025-11-13 04:43:33 +00:00