From 312ab446f970c2eb2c3a32a30b37a9717c455bdc Mon Sep 17 00:00:00 2001 From: Klaus Zerwes Date: Fri, 23 Feb 2024 02:40:07 +0100 Subject: [PATCH] allow install of custom scripts --- defaults/main.yml | 3 +++ tasks/configure.yml | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 1d72c30..b9660ed 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -121,6 +121,9 @@ pdns_backends: # 'hybrid': yes # 'dnssec-db': '{{ pdns_config_dir }}/dnssec.db' +# list of pdns backend scripts to install +pdns_backends_scripts: [] + # Administrative credentials to create the PowerDNS Authoritative Server MySQL backend database and user. pdns_mysql_databases_credentials: {} # pdns_mysql_databases_credentials: diff --git a/tasks/configure.yml b/tasks/configure.yml index fb103f6..531153a 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -43,6 +43,15 @@ mode: 0640 register: _pdns_configuration +- name: Install configured backend scripts + copy: + src: "{{ item }}" + dest: "{{ pdns_config_dir }}/{{ item }}" + owner: "{{ pdns_file_owner }}" + group: "{{ pdns_file_group }}" + mode: "0750" + with_items: "{{ pdns_backends_scripts }}" + - name: Ensure that the PowerDNS 'include-dir' directory exists file: name: "{{ pdns_config['include-dir'] }}"