get IP of instance to pass it as command arguement

22 views
Skip to first unread message

John Test

unread,
Apr 22, 2015, 5:14:25 PM4/22/15
to ansible...@googlegroups.com
Hello

I want to pass some arguments within a playbook but unsure on how to do it

Playbook here:
http://pastebin.com/Ga1L1hCa

The first part creates an Openstack instance, then it attaches a floating IP.
I want to grab the hostname and floating IP and use it in the 3rd task which is to create a DNS A record.

Appreciate the help!

Brian Coca

unread,
Apr 22, 2015, 5:25:37 PM4/22/15
to ansible...@googlegroups.com
you want to register the results of the first task

register: new_instance

then you can access the information returned in that variable, use
debug: var=new_instance to examine the structure.




--
Brian Coca
Reply all
Reply to author
Forward
0 new messages