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

17 lines
495 B
YAML

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