Add more configuration tasks for PowerDNS in Deployer

This commit is contained in:
Christer Warén
2025-09-11 20:01:10 +03:00
parent bda9baf442
commit 69bb0b7633

View File

@@ -393,6 +393,31 @@
- powerdns-authorative - powerdns-authorative
- dns - dns
- name: "Deployer - PowerDNS Authorative - Configure - Create Zone"
ansible.builtin.uri:
url: "http://127.0.0.1:8081/api/v1/servers/localhost/zones"
method: POST
headers:
X-API-Key: "{{ config.powerdns.apiKey }}"
status_code:
- 201
- 409
body_format: json
body: "{{ zone | to_json }}"
register: task
vars:
zone:
name: "tjas."
kind: native
ttl: 86400
changed_when:
- task.status == 201
failed_when:
- task.status != 201
- task.status != 409
tags:
- powerdns-authorative
- dns
- name: "Deployer - PowerDNS Recursor - Configure - Create Folder" - name: "Deployer - PowerDNS Recursor - Configure - Create Folder"
ansible.builtin.file: ansible.builtin.file: