Hello All,
I have been struggling for quite a while now sharing some registered variables during ec2 instances provisioning hosts: localhost with their configuration hosts: tag_Name_tagname of ec2.
Kindly have a look at this sample http://pastie.org/10378851 . In hosts: tag_MName_myappdblivemaster , I need to set the hostname of all the instances created during - name: Launch myapp DB Instances Availability A and - name: Launch myapp DB Instances Availability B.
Because I have not found any way of using the variable myapp_db_ec2_a and myapp_db_ec2_b in the other hosts like tag_MName_myappdblivemaster in particular, I had to break the run, copy the hostnames from the console and paste in in playbook before this can be successful. When I try with hostvars[‘localhost’] , I get basically nothing to work with.
Is there any thing I am missing or it’s not possible?
Best Regards,