Running a master playbook against different hosts

Hey everyone. We are having a weird problem trying to get something to work, so I thought I might ask the question. We have two playbooks, one that deploys a virtual machine in vmware, using the vsphere_guest module. This playbook, is run using connect_local. We then have a second playbook, that does all the initial setup stuff we need for teh host that was just deployed.

What we would like to do, is have something like a main.yml that calls both playbooks. Is there a way to do this, and pass the newly created hostname to the second host so that it runs against that host?

Basically, the goal, is to run a single playbook, that creates the VM, then performs all the host specific tasks to the new host.

We have tried setting the hostname as a variable over to the setup playbook, but ansible doesn’t seem to be happy with that one.

Any thoughts here would be greatly appreciated.

–John