i automated my home lab (and CLOUD) with Ansible

About this video

A sponsored, escalation-driven demo of automating VM deployment with Ansible, framed as productive laziness. He starts with playbooks that provision VMs on Linode and on AWS by pasting in an API token and reusing existing modules, then adds on-prem Proxmox in his home lab using a community module and a VM template. He explains idempotency: re-running a playbook only enforces the desired state, so it will not create a second identically named VM, and works around it by generating a random name. Next he adds Slack notifications carrying the finished VM’s IP address. That breaks on Proxmox, which does not assign or report an IP, and his Ubiquiti UniFi Dream Machine Pro cannot be automated, so he chains a workaround: pull the VM’s MAC address via a shell command, use Nmap to populate the ARP cache, then resolve the IP via ARP. Finally he avoids running playbooks manually at all: a voice request to Alexa goes through Zapier and Python code to the Red Hat Ansible Automation Platform API, which runs the playbooks across cloud and home lab and reports back via Slack. He also promotes the Ansible Fest 2022 on-demand content hub, with over 40 sessions, and a 60-day free trial and sandbox for the Automation Platform.

Key takeaways

  • Ansible playbooks plus existing cloud modules made Linode and AWS VM provisioning largely copy, paste and add an API token
  • Ansible is idempotent: it enforces the named state rather than creating duplicates, so unique random VM names are needed for repeated labs
  • Community modules and tutorials covered the less-documented Proxmox path, which also required building a VM template first
  • Getting a Proxmox VM’s IP took a hack: retrieve its MAC address, Nmap-scan the network to fill the ARP cache, then look the IP up via ARP for the Slack notification
  • Voice control was layered on via Alexa to Zapier to Python to the Red Hat Ansible Automation Platform API, because base Ansible has no API or webhooks

Episode details: published November 1, 2022 · 12:44 long. Summary written by Self Growth Videos from the episode itself. Business results and any income figures mentioned are NetworkChuck’s own claims, shared for education — they are not typical or guaranteed.


← Previous: I Built a HAUNTED HOUSE with Raspberry Pi · Next: Block ALL ads with this…(and speed up your internet) →

All NetworkChuck videos · NetworkChuck profile · NetworkChuck on YouTube

Sister brand · Vacation Club Promo

All-inclusive resort stays from $435

Qualified couples: promotional Mexico and Caribbean packages at real resorts. Short presentation during your stay — enjoy the rest of the trip.

Qualifications apply · presentation during stay · no purchase required

Subscribe YouTube Suggest