Commit Graph

46 Commits

Author SHA1 Message Date
dc2050db8d Added hypervisor inventory 2026-03-13 13:28:09 -07:00
Semaphore
a55a03de4a scripts: deploy_agent.sh — visudo optional, per-host credentials support 2026-03-13 10:11:23 -07:00
Semaphore
8195d68746 local_eng: add hosts inventory 2026-03-13 09:54:43 -07:00
Semaphore
7c962174da Onboard client: Local Eng (LE-001) — inventory scaffold 2026-03-13 09:00:13 -07:00
Semaphore
e147b15a89 scripts: add --bootstrap-proxmox flag to onboard_client.sh 2026-03-13 08:48:42 -07:00
Semaphore
d9d250021d Fix linux_reboot: use /proc/1/environ container=lxc for reliable LXC detection across all distros 2026-03-12 22:49:12 -07:00
Semaphore
a1905f2225 Fix linux_reboot: base version comparison for Debian kernels, skip LXC containers 2026-03-12 22:34:59 -07:00
Semaphore
24d41432fc Fix linux_reboot: remove preflight bootstrap play, use gather_facts directly 2026-03-12 22:29:18 -07:00
Semaphore
3f915a99a5 Update linux_reboot: use kernel version comparison instead of reboot-required flag 2026-03-12 22:21:54 -07:00
Semaphore
5b42dbd51e Add linux_reboot playbook, update onboard_client.sh with reboot template + xcpng support 2026-03-12 22:06:48 -07:00
Semaphore
a8bfe77354 Fix linux_patch role — remove dead os_family tasks, use ansible_os_family throughout 2026-03-12 21:50:31 -07:00
Semaphore
ca0f11b1c9 Fix snapshot role — XO REST API, fix playbook host targeting
- roles/snapshot/tasks/main.yml: replace xe CLI with XO REST API
  - POST /rest/v0/vms/<uuid>/actions/snapshot?sync=true
  - stores returned snapshot UUID as snapshot_id
  - baremetal: skips gracefully with warning
- playbooks/snapshot_pre.yml: target linux_hosts only (was all)
- playbooks/linux_patch.yml: remove snapshot + report roles (snapshot is separate step)
- playbooks/site_maintenance.yml: remove bootstrap play (handled per-playbook),
  remove windows_patch import (WinRM not implemented)
2026-03-12 21:44:20 -07:00
72126525ea Updated pre-flight to only check linux based hosts. 2026-03-12 12:36:52 -07:00
Semaphore
68c01ceafb Fix deploy_agent.sh — stdin consumption in loop, base64 script delivery via su 2026-03-12 12:02:16 -07:00
Semaphore
ddf49eec5e SRH-001: populate hosts inventory — 3 linux, 7 windows, 2 xcpng pools 2026-03-12 11:27:55 -07:00
Semaphore
45437ab60b Onboard client: Sanrufo Homes (SRH-001) — inventory scaffold 2026-03-12 11:18:21 -07:00
Semaphore
a42bf14665 Add XCP-NG integration, deploy_agent.sh, overhaul onboard_client.sh
- roles/xcpng_update: new role — patches XCP-NG pools via XO REST API
  - non-HA pools: pool-level install_patches + restart_hosts
  - HA clusters: rolling pool update via JSON-RPC pool.rollingUpdate
  - dry run support, patch verification after update
- roles/snapshot: add xcpng_xo hypervisor_type support via XO REST API
- playbooks/xcpng_pool_update.yml: new playbook for XCP-NG pool patching
- inventories/client_template/hosts.yml: add xcpng_hosts group
- scripts/onboard_client.sh: major overhaul
  - add --hypervisor proxmox|xcpng|baremetal|mixed
  - add --xo-url / --xo-token (falls back to global env)
  - webhook no longer required (falls back to N8N_WEBHOOK_URL in env)
  - ansible_user changed to ansible-msp-agent with sudo
  - xcpng_hosts group in inventory scaffold for xcpng/mixed clients
  - hypervisor-appropriate task templates created automatically
  - add --dry-run support
- scripts/deploy_agent.sh: new script — bootstrap ansible-msp-agent
  - reads hosts.yml to get Linux/Windows hosts
  - SSHes as native account, su - to root
  - creates ansible-msp-agent user + sudo-nopasswd group
  - deploys client key + MSP backup key to agent user and root
  - adjusts sshd_config, reloads sshd
  - verifies key-based login after bootstrap
  - Windows stub with skip + warning
  - continues on failure, prints summary
2026-03-12 11:15:43 -07:00
Semaphore
5b846654ba Update onboard_client.sh — full API automation, Proxmox vars, dynamic key IDs 2026-03-11 22:47:43 -07:00
5c3094c3b4 Update inventories/client_dfa_tech/hosts.yml 2026-03-11 22:25:35 -07:00
Semaphore
e530ae016b Fix linux_patch — normalize upgradable_packages_list to avoid stdout_lines error on skipped OS tasks 2026-03-11 21:09:40 -07:00
19f2a73527 Update playbooks/linux_patch.yml 2026-03-11 16:33:04 -07:00
843340496d Added set_fact 2026-03-11 16:30:39 -07:00
153502fe86 Updated logging rules based on OS type. 2026-03-11 15:38:44 -07:00
50d24eccdf Removed PBX
PBX requires different ways to upgrade.
2026-03-11 13:43:26 -07:00
f0e8861ff9 Manually added additional hosts 2026-03-11 12:54:24 -07:00
Semaphore
e5fd6a56b6 Add Alpine apk support to linux_patch role — update check, upgrade, reboot detection 2026-03-11 12:03:58 -07:00
Semaphore
de36867075 Fix XCP-NG delegate_to — use inline conditional to avoid empty hostname error 2026-03-11 12:00:33 -07:00
Semaphore
bd1b99f47d Fix XCP-NG tasks — skip when xcpng_host is empty, default delegate_to localhost 2026-03-11 11:56:55 -07:00
Semaphore
7368701e85 Fix YAML quote conflict in snapshot role — single quotes inside Jinja2 split filter 2026-03-11 11:33:37 -07:00
Semaphore
a88354149d Add proxmox_vmid 110 to alpine-caddy inventory 2026-03-11 11:31:23 -07:00
Semaphore
cccaec29ab Skip disk assert when mountpoint missing — handles Alpine LXC no /boot 2026-03-11 10:55:06 -07:00
Semaphore
184af05310 Fix disk check — df -P POSIX flag compatible with BusyBox Alpine and GNU coreutils 2026-03-11 10:48:16 -07:00
Semaphore
964b2a7909 Fix bootstrap OS detection — use /etc/os-release instead of ansible_os_family 2026-03-11 10:41:35 -07:00
Semaphore
db3c849811 Add Python bootstrap to site_maintenance, snapshot_pre — windows_patch skipped (WinRM) 2026-03-11 10:39:44 -07:00
Semaphore
4e7a78810a Add Python bootstrap task — auto-installs python3 on Alpine/Debian before gather_facts 2026-03-11 10:39:34 -07:00
Semaphore
b1f59b3b5a Add DFA Tech inventory — cp from template, alpine-caddy LXC 2026-03-11 10:23:09 -07:00
Semaphore
876a5010e5 Add client onboarding script with Semaphore API integration 2026-03-10 17:27:06 -07:00
Semaphore
fb8ea52d0f Add Proxmox helper script detection to preflight 2026-03-10 16:26:31 -07:00
Semaphore
a58b224ba3 Temp: add webhook URL debug task 2026-03-10 14:53:43 -07:00
Semaphore
f563df26d4 Fix change_freeze boolean coercion in preflight assert 2026-03-10 14:38:36 -07:00
Semaphore
3d8cc2ada1 Add n8n callback plugin — structured JSON webhook reporter with timing and version diffs 2026-03-10 14:25:52 -07:00
Semaphore
187933b8c0 Add windows_patch role — KB version tracking, reboot detection, category filtering 2026-03-10 14:24:38 -07:00
Semaphore
4a0e4fa4f9 Add linux_patch role — package facts before/after, apt/dnf, version diff tracking 2026-03-10 14:23:38 -07:00
Semaphore
379fc49331 Add snapshot role — Proxmox and XCP-NG pre-patch snapshot with verification 2026-03-10 14:22:38 -07:00
Semaphore
a6029cd081 Add preflight role — disk, load, reboot, change freeze checks 2026-03-10 14:16:48 -07:00
Semaphore
1ae6576dab Initial repo structure — playbook skeletons, roles, client template inventory 2026-03-10 14:03:29 -07:00