diff --git a/tasks/deployer.yml b/tasks/deployer.yml index e2ee324..01b8d48 100644 --- a/tasks/deployer.yml +++ b/tasks/deployer.yml @@ -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