For simple strings, you can write them to disk by using the 'content' 
option of the copy module http://docs.ansible.com/ansible/copy_module.html 
 (which you can delegate to localhost to copy to your ansible controller 
machine).

Hope this helps,

Jon

On Monday, June 19, 2017 at 2:23:38 PM UTC+1, David Rose wrote:
>
> Hello all!
> I have a questions regarding capturing return values and writing them to a 
> file.  Specifically, my use-case is in cloud provisioning ... I am standing 
> up any number of VMs.  When the VM is created, and only when it is created, 
> a return value held by <hostname>.password is available.  I can print the 
> instance variable in a debug message.  But my question is, how can I 
> capture it automatically for future connections to this server without 
> writing to paper?  How can I automate, if the variable .password exists, so 
> that it is written (maybe to vault?) and then used for subsequent plays for 
> use in, I believe,  'ansible_become_pass'?
>
> Thank you!
> -dave
>

-- 
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/368dc7d3-344b-4c5b-88ef-e83696519c17%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to