#####################################
### someone's ansible provisioner ###
#####################################
# Part of: https://git.somenet.org/root/pub/somesible.git
# 2017-2025 by someone <someone@somenet.org>
#
---
- name: copy zone {{zone}} file
  copy:
    src: "{{item}}"
    dest: "/etc/bind/db/{{zone}}"
    mode: 0644
    owner: "root"
    group: "root"
  with_first_found:
    - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/db/{{zone}}"
    - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/db/{{zone}}"
    - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/db/{{zone}}"
    - "default/db/{{zone}}"
  notify: restart named.service
