Hello, I am looking to utilize consul to dynamically update my inventory system for ansible. Here is the scenario:
I am running openstack and using the openstack provisioning features in ansible. The instances get a dynamic ip address. What i need to be able to do is take that ip address and use it to ssh into the newly created node to finish my install. Here is a snip from the playbook. As you can see I am able to completely populate the consul K/V store with the ip address of the new instance. Question is how can i tell ansible to use that IP to perform its followup tasks. (i.e. sshing to the new instance to run commands) Thanks, Mike #---- - name: Get list of all VMs os_server_facts: timeout: 300 delegate_to: localhost - name: Update consul kv store consul_kv: host: "10.100.1.50" key: "ansible/groups/dc1/{{ item.name }}" value: "{{ item.public_v4 }}" with_items: "{{ openstack_servers }}" -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/a2796b0e-a45f-4976-bc59-0e870702ef58%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.