Ansible Playbooks for managing Wizardco.re Infrastructure
| inventory | ||
| tasks | ||
| .gitignore | ||
| README.md | ||
| update-s0.yml | ||
| update-s1.yml | ||
| update-s2.yml | ||
wizardco.re playbooks
Ansible playbooks for maintaining the Proxmox-based server infrastructure in my homelab.
Playbooks
- update-s[0,1,2].yml: Playbooks for upgrading/rebooting Proxmox resource pools S0, S1, and S2. HA applications are spread across the 3 pools to maintain application uptime, and interdependent services are laid out in a manner that minimizes application downtime.
Tasks
Current tasks are as follows:
- upgrade.yml: Prompts for a post-upgrade reboot, and performs a full system upgrade with the appropriate package manager.
- proxmox_services.yml: Checks the Proxmox VM/LXC's notes for a JSON snippet that contains a list of the services that should be checked. It will then run a check against these to ensure they're started.
Inventories
Currently, there are two inventory files:
- proxmox.yml: Dynamic inventory that queries a Proxmox cluster for nodes, VM's, LXC's, etc. It will also convert the notes (which are expected to be a JSON snippet with embedded data) into its own host variable for further maintenance tasks.
- truenas.yml: As TrueNAS doesn't have an API for querying info about active Containers/VM's, a static inventory is defined with the currently active containers, as these containers are only kept on the TrueNAS machine as a third node of redundancy for HA applications, as well as the Proxmox Backup Server for immediate access to bulk storage.
For the notes section of a Proxmox node using these tasks, the notes should be a json snippet that includes the services that should be checked, along with relevant healthchecks. (HEALTHCHECKS ARE WIP)
Ex: NGINX webserver with an Anubis server in front of it, with the published site on port 8080
{ "services": ["nginx", "anubis@default"], "healthcheck": [{"http": "webserver:8080"}] }