Day 83 of DevOps, Day 33 of Azure. Both tasks today were made of parts that are each correct on their own and do nothing until something joins them.
An Ansible inventory and an Ansible playbook are two files, neither of which references the other. A load balancer has four kinds of components, and three of them are inert until a rule names all three together.
One Ansible task, one Azure task. Create an inventory so an existing playbook runs, then put a load balancer in front of a VM. The tasks come from the KodeKloud Engineer platform.
Task 1: An inventory for a playbook that already exists
The task: create an inventory at /home/thor/playbook/inventory so the playbook sitting next to it can run against stapp03 .
Step 1: Keys before the file
The security point is worth making before writing anything, and it is the Day 82 finding: storing a password in a plain-text inventory is what Ansible's own documentation tells you not to do, in the description of the variable itself.…