For future people, I just found a neat way to do this without having to add 
".stdout" to your templates.


- name: get gridfs host ip from name (required for nginx gridfs module)
  shell: 'ping -q -c 1 -t 1 {{ gridfs_host }} | grep PING | sed -e 
"s/).*//" | sed -e "s/.*(//"'
  register: gridfs_ip_command
  when: gridfs_ip is not defined

- name: set gridfs ip
  set_fact: gridfs_ip={{ gridfs_ip_command.stdout }}
  when: gridfs_ip is not defined



On Tuesday, 16 October 2012 11:09:09 UTC+11, PePe Amengual wrote:
>
> Please ignore it was a freaking TYPO!!!!!!
>
> Thanks to diff for that.
>
> On Thursday, 27 September 2012 12:07:29 UTC-7, PePe Amengual wrote:
>>
>> Hi.
>>
>> is there a way to call a python program  ( or any other script) and get 
>> the output on a variable ?
>>
>> Thanks.
>>
>

-- 
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].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to