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

15 lines
467 B
YAML

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