16 lines
397 B
YAML
16 lines
397 B
YAML
- name: Change DNS
|
|
lineinfile:
|
|
path: /etc/dhcp/dhclient.conf
|
|
regexp: '^\s*prepend\s+domain-name-servers'
|
|
insertafter: 'prepend\s+domain-name-servers'
|
|
state: 'present'
|
|
line: 'prepend domain-name-servers 1.0.0.1;'
|
|
become: yes
|
|
register: changed_dns
|
|
#- name: Restart networking
|
|
# service:
|
|
# name: network
|
|
# state: restarted
|
|
# become: yes
|
|
# when: changed_dns.changed
|