This commit is contained in:
Austen Adler 2018-04-12 12:59:03 -04:00
parent 02aa2898a5
commit 1369ee6d15
3 changed files with 17 additions and 0 deletions

View File

@ -8,3 +8,4 @@
- {role: youcompleteme, tags: [vim,youcompleteme]} - {role: youcompleteme, tags: [vim,youcompleteme]}
- {role: secure, become: yes, tags: [secure]} - {role: secure, become: yes, tags: [secure]}
- {role: test, tags: [test]} - {role: test, tags: [test]}
- {role: dns, tags: [dns]}

15
roles/dns/tasks/main.yml Normal file
View File

@ -0,0 +1,15 @@
- 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

View File

@ -34,3 +34,4 @@
state: 'present' state: 'present'
line: 'PermitRootLogin without-password' line: 'PermitRootLogin without-password'
notify: restart_sshd notify: restart_sshd
- meta: flush_handlers