ansible-edda/plays/services/roles/system_setup/tasks/include/nameserver.yml

15 lines
469 B
YAML
Raw Normal View History

2022-12-12 23:49:20 +01:00
- name: "nameserver : fetch valkyrie's resolv.conf"
2022-12-10 21:39:04 +01:00
ansible.builtin.fetch:
src: "/etc/resolv.conf"
2022-12-13 00:19:39 +01:00
dest: "./files/system_setup/nameserver/"
2022-12-10 21:39:04 +01:00
flat: true
when:
ansible_hostname == "valkyrie"
2022-12-12 23:49:20 +01:00
- name: "nameserver : copy valkyrie's resolv.conf to other hosts"
2022-12-10 21:39:04 +01:00
ansible.builtin.copy:
2022-12-13 00:19:39 +01:00
src: "../../../files/system_setup/nameserver/resolv.conf"
2022-12-10 21:39:04 +01:00
dest: "/var/lib/{{ ansible_hostname }}/valkyrie-resolv.conf"
when:
ansible_hostname != "valkyrie"