I am new to ansible.
Is there a simple way to replace the line starting with option domain-name-servers in /etc/dhcp/interface-br0.conf with mo
option domain-name-servers
/etc/dhcp/interface-br0.conf
I created a role dhcp with the following main.yaml:
dhcp
main.yaml
--- - name: add all dns servers lineinfile: dest: /etc/dhcp/interface-br0.conf regexp: '^\s*option domain-name-servers.*$' line: ' option domain-name-servers 10.116.184.1,10.116.144.1,10.116.136.1;' backrefs: yes become: true