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

15 lines
516 B
YAML
Raw Normal View History

2022-12-18 23:43:40 +01:00
---
2023-02-12 19:37:33 +01:00
- name: "nameserver : fetch {{ services_resolv_host }}'s resolv.conf"
2022-12-10 21:39:04 +01:00
ansible.builtin.fetch:
src: "/etc/resolv.conf"
2022-12-18 19:49:55 +01:00
dest: "./files/services/setup/system/nameserver/"
2022-12-10 21:39:04 +01:00
flat: true
when:
2023-02-12 19:37:33 +01:00
ansible_hostname == services_resolv_host
2022-12-10 21:39:04 +01:00
2023-02-12 19:37:33 +01:00
- name: "nameserver : copy {{ services_resolv_host }}'s resolv.conf to other hosts"
2022-12-10 21:39:04 +01:00
ansible.builtin.copy:
2022-12-18 19:49:55 +01:00
src: "files/services/setup/system/nameserver/resolv.conf"
2023-02-12 19:37:33 +01:00
dest: "{{ services_root_directory }}/{{ services_resolv_host }}-resolv.conf"
2022-12-18 23:00:28 +01:00
mode: 0644