Add PowerDNS Authorative database initialization task

This commit is contained in:
Christer Warén
2025-09-07 20:51:12 +03:00
parent 4b6a6b20d2
commit 54aa66e3c4

View File

@@ -347,6 +347,26 @@
- powerdns-authorative
- dns
- name: "Deployer - PowerDNS Authorative - Database - Initialize"
community.mysql.mysql_db:
login_host: "127.0.0.1"
login_user: "{{ config.mariadb.users['powerdns'].username }}"
login_password: "{{ config.mariadb.users['powerdns'].password }}"
name: "{{ config.mariadb.users['powerdns'].database }}"
state: import
target: ',/files/powerdns-authorative/schema.mysql.sql'
failed_when: true
when:
- (deployerTaskM2 is defined and deployerTaskM2.changed) or deployerTaskM2 is undefined
- config.mariadb.users is defined
- config.mariadb.users['powerdns'] is defined
- config.mariadb.users['powerdns'].username is defined
- config.mariadb.users['powerdns'].password is defined
- config.mariadb.users['powerdns'].database is defined
tags:
- powerdns-authorative
- dns
- name: "Deployer - PowerDNS Authorative - Pull Image"
containers.podman.podman_image:
name: docker.io/powerdns/pdns-auth-50