Playbooks to a new Lilik
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
304 B

7 years ago
7 years ago
  1. - name:
  2. lineinfile:
  3. dest: '/etc/hosts'
  4. line: '{{ ansible_default_ipv4.address }} {{ host_fqdn }}.'
  5. regexp: '^\s*\S* {{ host_fqdn }}.'
  6. delegate_to: gandalf
  7. register: hosts
  8. - name: dnsmasq force hosts reload
  9. command: "killall -HUP dnsmasq"
  10. delegate_to: gandalf
  11. when: hosts.changed