Ansible Automation

iFargle

Linux / HPC / K8s SME
Staff member
Messages
4,403
Location
N/A
Hey,
just wondering who runs Ansible at work / at home and how you're handling it.

My main question. How do you handle automatic inventory lists?

I currently have a script on a MySQL box that uses the Proxmox API to pull a list of all VM's, then sort by operating system into separate inventory files.

I have a central "all.yml" playbook that calls separate yaml files:
Ubuntu - ubuntu specific items (installing certain items mostly)
CentOS - CentOS specific items (yum, repo configs, etc)
Debian - Debian specific items
General - Handles most of the heavy lifting. This is applied to all systems and does general file templating and package installations

Second, I have an "update.yml" file that is ran nightly that handles all OS updating on my system.

Wondering if there's a better / more efficient way of doing this. It seems to work pretty well, just wondering what best practices are.
 
Back
Top Bottom