I am trying to replace public ip  with private ip in /etc/hosts for bulk of 
hosts . 

Current setup


PUBLIC_IP   hostname  shot_hostname 

Needed :
 
PRIVATE _IP hostname  short_hostname



How I can do it using ansible? I wonder if it can be done using gathered 
facts by ansible? 
I would think of , getting the public ip and register as  variable and same 
time get the private ip . 
Now, replacing it using replace or inline module. Any best approach ?

-- 
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/e0265d84-a006-4d11-ac9d-b245218870b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to