I'm trying to write an Ansible script that will replace the network line in 
/etc/sysconfig/network file if the FQDN is not specified and if the gateway 
is (say) 10.10.10.1.

So this is what I have so far:

---

 - name: Update Network

   when: ("inventory_hostname == inventory_hostname_short" and gateway == 
10.10.10.1)



I don't know what I need to do to replace the 
HOSTNAME=inventory_hostname_short with HOSTNAME=inventory_hostname.  I 
basically want to replace the HOSTNAME statement with the FQDN. 


Also, does that when statement look right?


TIA

-- 
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/a20b9df8-222d-4e51-867a-a4a98306bf8a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to