0

I've got 3 tasks in my playbook that operate on hypervisor supplied in hosts file - create vm from template with preconfigured network settings, customise its parameters, power on and from that point all other tasks should run on created vm based on connecting through hardcoded ip from template.

How do i go about running tasks exclusively on the created vm? what should i use? I could use some guidance on where to look for an answer.

1 Answers1

1

It's possible with dynamic inventory. You should provision VM in first playbook, which should return dynamic inventory for next playbook which executes commands on newly created VM.

Alexander Tolkachev
  • 4,513
  • 3
  • 14
  • 23