I need to ensure that the /etc/sysconfig/network file contains the FQDN on a good number of hosts. I think the lineinfile module would be helpful here. But I’m sure how to write the Ansible script to do so. Any advice?
Thanks in advance.
I need to ensure that the /etc/sysconfig/network file contains the FQDN on a good number of hosts. I think the lineinfile module would be helpful here. But I’m sure how to write the Ansible script to do so. Any advice?
Thanks in advance.
Start with:
https://gist.github.com/muloka/7687250
https://docs.ansible.com/ansible/lineinfile_module.html
Rough draft (untested):