I currently have a Workflow in Tower that does what I want, but it is doing so via a cumbersome method:
-
First playbook creates a VM
-
VMware Inventory sync
-
Run additional playbooks (that may now be targeting already configured Windows VMs) to configure settings and install apps.
Ideally, all I REALLY want to do is: -
Create the VM
-
Run the additional playbooks to configure settings and install apps – against ONLY the newly created VM.
I have seen examples in many places where folks use add_host in playbooks that create new VMs/instances/etc so further actions can be taken.
I’m trying that as well, but cannot seem to get the Windows VM to be reachable via WinRM. Part of the ‘fun’ is that my VM is being customized and must first do the “OS Customization” reboot before Windows will have the correct IP and for the WinRM listener to be created. The code below is the playbook I’m currently running:
`