For archival Purposes , 

I modified my task thus: 

---
- hosts: 127.0.0.1
  connection: local
  user: root
  tasks:
    - name: Create linode machine
      linode: 
        api_key: 'slsoajsd'
        name: deb
        plan: 1
        datacenter: 7
        distribution: 140
        password: 'sasda'
        #linode_id: '12345678'
        ssh_pub_key: '.....'
        wait: yes
        wait_timeout: 600
        state: present 
      register: linode_return
    - local_action: copy content="{{ linode_return.instance.ipv4 }}" 
dest=/path/to/file

Was more intrested i getting the ipv4 address of the new instance. You can 
use

- local_action: copy content="{{ linode_return}}" dest=/path/to/file 

to see the list of all returned values




On Wednesday, September 23, 2015 at 1:12:53 AM UTC+1, Iwada Eja wrote:
>
>
> My goodness!
>  Ansible indeed rocks. Issue resolved, plus i understand things better now!
> Thanks Guys
>
>
>
> On Tuesday, September 22, 2015 at 11:22:44 PM UTC+1, Brian Coca wrote:
>>
>> you can even write to host_vars/linode_host 
>>
>> linode_id: 2134234 
>>
>> and it becomes a hostvar that is automatically loaded associated to that 
>> host. 
>>
>>
>> -- 
>> Brian Coca 
>>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/fce718f3-c278-4da2-9173-fc6ee205c684%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to