Ah! Thanks but I don’t think that’s what I’m looking for. Let me try to clear it up.
I have a playbook that runs a clone command with virsh on a remote machine with a hypervisor. The virtual machine spins up and boots with a new IP.
I’d like to run a post provisioning playbook on a workflow.
AWX to hypervisor then vm gets created and a new run to a new vm to post provision. I have no way of knowing ahead of time what IP will be because of DHCP.
Hi JJ. I’ve solved similar problems in the past using an inventory update block in the workflow. The general idea is to place an inventory synchronization step between the job template that creates the vm and the one that runs a playbook against it.
[job template 1: creates vm] ----> [inventory sync] ----> [job template 2: run tasks against vm]
You will need to configure your inventory and job template such that job template 2 runs on the set of host(s) you expect given the updated inventory. There’s more than one way to do that, but it can generally be accomplished with a combination of inventory source parameters and limit filters on the job template.