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

15 lines
469 B
YAML

- name: "nameserver : fetch valkyrie's resolv.conf"
ansible.builtin.fetch:
src: "/etc/resolv.conf"
dest: "./files/system_setup/nameserver/"
flat: true
when:
ansible_hostname == "valkyrie"
- name: "nameserver : copy valkyrie's resolv.conf to other hosts"
ansible.builtin.copy:
src: "../../../files/system_setup/nameserver/resolv.conf"
dest: "/var/lib/{{ ansible_hostname }}/valkyrie-resolv.conf"
when:
ansible_hostname != "valkyrie"