I have developed the playbook which created a vm in azure(playbook name is CreateAzureVM.yml) and I have another playbooks which Installs softwares on the VM(install_software.yml).
I have imported install_software.yml in the CreateAzureVM.yml playbook. install_software.yml takes the host info from inventory file which contains ansible_connection=ssh ansible_ssh_pass=XYZ ansible_host=IPaddressOfTheHost
Now my requirement is that I want to pass the IP address of the newly created machine to the Imported playbook so instead of taking the static IP provided in the inventory it can take it dynamically from the CreateAzureVM.yml.
I already tried to update the inventory file but looks like updating the inventory file in the middle of CreateAzureVM playbook does not help because inventory file is already loaded and updating it afterward does not help.
Any quick help would be greatly appreciated.
Regards
Rajaniesh