win_lineinfile | Regex

17 views
Skip to first unread message

Tiago Pimpão

unread,
Feb 26, 2018, 10:50:03 AM2/26/18
to Ansible Project
Hi,
I need to update a property in a file but the value i need to write depend of the inventory_hostname.
If the hostname is ABCAPP1.MYDOMAIN.COM the value i need to write is APP1
If the hostname is ABCDB1.MYDOMAIN.COM the value i nedd to write is DB1

How can i do this? 
Thanks,
TP
Reply all
Reply to author
Forward
0 new messages