diff --git a/README.md b/README.md index fcdf5d949f479cc47e43a88c31c193d54b977faf..f2bfabd043979a14022ef4a8d3e81929c072e5ab 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,10 @@ This is the integration of several pieces of code, namely: - the official PowerDNS.pdns and PowerDNS.pdns_recursor ansible code - some further code of my own to cross-configure Admin node based on Auth configuration - yet some other own code to configure PowerDNS-Admin according to official instructions - + (container-based is here https://github.com/PowerDNS-Admin/PowerDNS-Admin but we are + using local install, documented here: + https://github.com/PowerDNS-Admin/PowerDNS-Admin/tree/master/docs/wiki) + Note that the versions of PowerDNS.pdns and PowerDNS.pdns_recursor available within this package were the official ones available, at some point in time, from ansible-galaxy via: @@ -20,9 +23,9 @@ example, update PowerDNS.dns I suggest to: - execute: cd /tmp/ - ansible-galaxy --roles-path . install PowerDNS.pdns + ansible-galaxy role install --roles-path ./ PowerDNS.pdns -- and then perform some diff/merge ... +- and then perform some diff/merge ... Inventory --------- @@ -60,11 +63,44 @@ Note that `inventory_bootstrap.yml` makes reference to generic usernames. Install PowerDNS Authoritative servers -------------------------------------- +If updating, operate on a single instance, and save current database content: + + mysql -u <dbuser> -h localhost -p<dbpass> pdns -e "select D.name,D.master,D.last_check,D.type,D.notified_serial,D.account,R.name,R.type,R.content,R.ttl,R.prio,R.disabled from records as R left join domains as D on R.domain_id=D.id order by D.name,R.type;" > /tmp/records_<thissite> + Install or update servers: ansible-playbook -i inventory.yml manageDnsAuth.yml +Notes on updating +----------------- + +One step in the playbook deals with "apt update": should this crash for +invalid signatures, you may import new signature with the command: + + apt-key adv --recv-keys --keyserver keyserver.ubuntu.com <failingSignature> + +Should database access for 'root' fail, chances are that root@localhost is configured +to use auth_socket rather than password. I opted for not touching default root@localhost, +but rather create new account 'rootwpass': + + create user 'rootwpass'@'localhost' identified with mysql_native_password by '<securePwd>'; + GRANT ALL PRIVILEGES ON *.* TO 'rootwpass'@'localhost' WITH GRANT OPTION; + +(with MariaDB the create user command is rather: create user 'rootwpass'@'localhost' identified with mysql_native_password using password('<securePwd>');) + +When installing MariaDB over a previous MySQL installation, you may encounter the +problem described here (mariadb service stuck in "activating"): https://serverfault.com/questions/1013128/mariadb-service-start-stuck-at-activating + Perform the suggested steps: + = sudo systemctl stop mariadb + = echo "/usr/sbin/mysqld { }" | sudo tee /etc/apparmor.d/usr.sbin.mysqld + = sudo apparmor_parser -v -R /etc/apparmor.d/usr.sbin.mysqld + # This should display Removal succeeded for "/usr/sbin/mysqld". + = sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/usr.sbin.mysqld + +Upgrade to flask environment may also be needed: pip3 install --upgrade pip + + Install PowerDNS-Admin server ----------------------------- @@ -72,7 +108,6 @@ Install or update servers: ansible-playbook -i inventory.yml manageDnsAdmin.yml - Install PowerDNS-recursor ------------------------- diff --git a/roles/PowerDNS.admin/handlers/main.yml b/roles/PowerDNS.admin/handlers/main.yml index 5f4744b6ff79a0ffa5a699edef81bc8f14b1f0af..0b2461125df5a7474477460519ce909a70c3b5bc 100644 --- a/roles/PowerDNS.admin/handlers/main.yml +++ b/roles/PowerDNS.admin/handlers/main.yml @@ -6,3 +6,8 @@ name: "{{ apache_srv_name }}" state: restarted +- name: Restart Nginx + service: + name: "{{ nginx_srv_name }}" + state: restarted + diff --git a/roles/PowerDNS.admin/tasks/configureWebService_flask.yml b/roles/PowerDNS.admin/tasks/configureWebService_flask.yml index 1339386e31d0eecb97f24a344d128c6ac0f18bff..2e2c3be6b6cb07fa30db120968e49064761424b3 100644 --- a/roles/PowerDNS.admin/tasks/configureWebService_flask.yml +++ b/roles/PowerDNS.admin/tasks/configureWebService_flask.yml @@ -4,8 +4,9 @@ - name: Create systemd startup script template: - src: powerdns-admin_service.j2 + src: powerdns-admin_service_flask.j2 dest: /etc/systemd/system/powerdns-admin.service + - name: Reload systemd systemd: daemon_reload: yes diff --git a/roles/PowerDNS.admin/tasks/configureWebService_nginx.yml b/roles/PowerDNS.admin/tasks/configureWebService_nginx.yml new file mode 100644 index 0000000000000000000000000000000000000000..65cd41b81d51f1e9a6be279171be94d8a519c3d6 --- /dev/null +++ b/roles/PowerDNS.admin/tasks/configureWebService_nginx.yml @@ -0,0 +1,96 @@ +--- + +- debug: msg="Configure service using Nginx" + +- debug: msg="WARNING, NOT FOR CENTOS" + +- block: + - name: Resolve hostname for PowerDNS-Admin server + shell: host {{ pdnsadmin_webaddr }} | awk '{print $NF}' | sed -e 's/\.$//' + register: nslookup_out + run_once: True + + - set_fact: + pdnsadmin_webname={{ nslookup_out.stdout }} + when: + - pdnsadmin_webname is undefined + +- debug: msg="Webname {{ pdnsadmin_webname }}" + +- name: Install Nginx webserver and modules (for Python3) + package: + name: "{{ item }}" + state: present + with_items: + - "{{ nginx_pkg_name }}" + - "{{ nginx_pkg_name }}-core" +- name: Enable Nginx + service: + name: "{{ nginx_srv_name }}" + enabled: True + +- name: Create destination directory for SSL certificates + file: + state: directory + path: /etc/ssl/ + owner: root + group: root + mode: 0755 +- name: Copy server SSL certificates + copy: + src: "{{ item }}" + dest: /etc/ssl/ + with_items: + - "{{ pdnsadmin_webname }}.crt" + - "{{ pdnsadmin_webname }}.key" + when: + - pdnsadmin_webhttps + - pdnsadmin_ssl_update + + +- name: Create Nginx VirtualHost (http) configuration script + template: + src: powerdns-admin_config_nginx_http.j2 + dest: /etc/nginx/conf.d/powerdns-admin.conf + force: yes + owner: root + group: root + mode: 0644 + notify: + - Restart Nginx + when: + - not pdnsadmin_ssl_update +- name: Create Nginx VirtualHost (https) configuration script + template: + src: powerdns-admin_config_nginx_https.j2 + dest: /etc/nginx/conf.d/powerdns-admin.conf + force: yes + owner: root + group: root + mode: 0644 + notify: + - Restart Nginx + when: + - pdnsadmin_ssl_update + +- name: Create systemd startup script + template: + src: powerdns-admin_service_nginx.j2 + dest: /etc/systemd/system/powerdns-admin.service +- name: Create systemd socket + template: + src: powerdns-admin_socket_nginx.j2 + dest: /etc/systemd/system/powerdns-admin.socket +- name: Create systemd tmpfile + template: + src: powerdns-admin_tmpfile_nginx.j2 + dest: /etc/tmpfiles.d/powerdns-admin.conf +- name: Reload systemd + systemd: + daemon_reload: yes + name: "{{ item }}" + enabled: yes + state: restarted + with_items: + - powerdns-admin.socket + - powerdns-admin.service diff --git a/roles/PowerDNS.admin/tasks/main.yml b/roles/PowerDNS.admin/tasks/main.yml index d564b2215e063a802d0ea94f08c2d9ae28755ba8..464ba42c6f3a12b9ea2ef6e1a61402cda0cdffc3 100644 --- a/roles/PowerDNS.admin/tasks/main.yml +++ b/roles/PowerDNS.admin/tasks/main.yml @@ -2,13 +2,13 @@ # tasks file for PowerDNS.admin ### get_distribution -- include: ../roles/common/tasks/loadVariables.yml +- include_tasks: ../roles/common/tasks/loadVariables.yml ### Packages -- include: ../roles/common/tasks/updatePkg.yml +- include_tasks: ../roles/common/tasks/updatePkg.yml tags: configpkg -- include: ../roles/common/tasks/upgradePkg.yml +- include_tasks: ../roles/common/tasks/upgradePkg.yml tags: upgradepkg ### Collect variables from first host in 'dnsauthmaster' group @@ -60,16 +60,20 @@ path: "{{ pdnsadmin_basedir }}" state: directory -# - name: Clone Git repository -# git: -# repo: "{{ pdnsadmin_gitrepo }}" -# clone: yes -# dest: "{{ pdnsadmin_basedir }}/{{ pdnsadmin_destdir }}" - +- name: Clone Git repository + ansible.builtin.git: + repo: "{{ pdnsadmin_gitrepo }}" + clone: yes + update: yes + force: yes + dest: "{{ pdnsadmin_basedir }}/{{ pdnsadmin_destdir }}" + +# default config powerdnsadmin/default_config.py is Git-managed so we pick another one +# --> this implies setting FLASK_CONF later, relative to powerdnsadmin directory - name: Create config.py from template copy: - src: "{{ pdnsadmin_basedir }}/{{ pdnsadmin_destdir }}/config_template.py" - dest: "{{ pdnsadmin_basedir }}/{{ pdnsadmin_destdir }}/config.py" + src: "{{ pdnsadmin_basedir }}/{{ pdnsadmin_destdir }}/powerdnsadmin/default_config.py" + dest: "{{ pdnsadmin_basedir }}/{{ pdnsadmin_destdir }}/configs/production.py" remote_src: yes owner: "{{ pdnsadmin_usr }}" group: "{{ pdnsadmin_grp }}" @@ -100,9 +104,9 @@ name: "{{ item }}" state: present with_items: - - mysql-server - - mysql-client - - python-mysqldb + - mariadb-server + - mariadb-client + - python3-mysqldb when: ansible_os_family == 'Debian' - name: Start the MySQL service on RedHat @@ -116,25 +120,26 @@ - name: Start the MySQL service on Debian become: true service: - name: mysql - state: started + name: mariadb + state: restarted enabled: true when: ansible_os_family == 'Debian' - name: Create database mysql_db: - login_host: "{{ pdnsadmin_dbhost }}" - login_password: "{{ pdnsadmin_dbRootPass }}" login_user: "{{ pdnsadmin_dbRootUser }}" + login_password: "{{ pdnsadmin_dbRootPass }}" + login_host: "{{ pdnsadmin_dbhost }}" login_port: "{{ pdnsadmin_dbPort | default('3306') }}" name: "{{ pdnsadmin_dbname }}" + state: present collation: utf8_general_ci encoding: utf8 - name: Grant privileges to database mysql_user: - login_host: "{{ pdnsadmin_dbhost }}" - login_password: "{{ pdnsadmin_dbRootPass }}" login_user: "{{ pdnsadmin_dbRootUser }}" + login_password: "{{ pdnsadmin_dbRootPass }}" + login_host: "{{ pdnsadmin_dbhost }}" login_port: "{{ pdnsadmin_dbPort | default('3306') }}" name: "{{ pdnsadmin_dbuser }}" password: "{{ pdnsadmin_dbpass }}" @@ -146,9 +151,9 @@ ### Customize PowerDNS-Admin -- name: Customize config.py +- name: Customize configs/production.py lineinfile: - path: "{{ pdnsadmin_basedir }}/{{ pdnsadmin_destdir }}/config.py" + path: "{{ pdnsadmin_basedir }}/{{ pdnsadmin_destdir }}/configs/production.py" state: present line: "{{ item.name }} = {{ item.value }}" regexp: "{{ item.regexp }}" @@ -159,18 +164,15 @@ stat: path: "{{ pdnsadmin_basedir }}/{{ pdnsadmin_destdir }}/flask/bin/activate" register: flask_env - - name: Create virtualenv shell: virtualenv -p python3 flask args: chdir: "{{ pdnsadmin_basedir }}/{{ pdnsadmin_destdir }}" when: - flask_env.stat.exists == False - - name: Temporary fix for nodejs-yarn oddity # 2019-01-15: see https://github.com/yarnpkg/yarn/issues/6914 - shell: curl -sL https://deb.nodesource.com/setup_10.x | bash - && apt-get install -y nodejs - + shell: curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt-get install -y nodejs - name: Configure virtualenv, install module pip: virtualenv: "{{ pdnsadmin_basedir }}/{{ pdnsadmin_destdir }}/flask" @@ -183,7 +185,7 @@ chdir: "{{ pdnsadmin_basedir }}/{{ pdnsadmin_destdir }}" requirements: "{{ pdnsadmin_basedir }}/{{ pdnsadmin_destdir }}/requirements.txt" - name: Configure virtualenv, execute commands - shell: "export FLASK_APP=app/__init__.py ; {{ item }}" + shell: "export FLASK_APP=powerdnsadmin/__init__.py ; export FLASK_CONF=../configs/production.py ; {{ item }}" args: chdir: "{{ pdnsadmin_basedir }}/{{ pdnsadmin_destdir }}" with_items: @@ -199,14 +201,23 @@ group: "{{ pdnsadmin_grp }}" recurse: yes -- debug: msg="Flag is {{ pdnsadmin_runInApache }}" +- debug: msg="Flag pdnsadmin_runInFlask {{ pdnsadmin_runInFlask }}" +- debug: msg="Flag pdnsadmin_runInApache {{ pdnsadmin_runInApache }}" +- debug: msg="Flag pdnsadmin_runInNginx {{ pdnsadmin_runInNginx }}" ### Configure and start web service +# WARNING: not updated - include_tasks: configureWebService_flask.yml when: - - not pdnsadmin_runInApache + - pdnsadmin_runInFlask +# WARNING: not updated - include_tasks: configureWebService_apache.yml when: - pdnsadmin_runInApache + +- include_tasks: configureWebService_nginx.yml + when: + - pdnsadmin_runInNginx + diff --git a/roles/PowerDNS.admin/templates/powerdns-admin_config_nginx_http.j2 b/roles/PowerDNS.admin/templates/powerdns-admin_config_nginx_http.j2 new file mode 100644 index 0000000000000000000000000000000000000000..c0aaeaebc1ab54608cb424c2e4453f75acf488b3 --- /dev/null +++ b/roles/PowerDNS.admin/templates/powerdns-admin_config_nginx_http.j2 @@ -0,0 +1,36 @@ +server { + listen *:{{ pdnsadmin_webport }}; + server_name {{ pdnsadmin_webname }}; + + index index.html index.htm index.php; + root {{ pdnsadmin_basedir }}/{{ pdnsadmin_destdir }}; + access_log /var/log/nginx/pdnsadmin_access.log combined; + error_log /var/log/nginx/pdnsadmin_error.log; + + client_max_body_size 10m; + client_body_buffer_size 128k; + proxy_redirect off; + proxy_connect_timeout 90; + proxy_send_timeout 90; + proxy_read_timeout 90; + proxy_buffers 32 4k; + proxy_buffer_size 8k; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_headers_hash_bucket_size 64; + + location ~ ^/static/ { + include /etc/nginx/mime.types; + root {{ pdnsadmin_basedir }}/{{ pdnsadmin_destdir }}/powerdnsadmin; + location ~* \.(jpg|jpeg|png|gif)$ { expires 365d; } + location ~* ^.+.(css|js)$ { expires 7d; } + } + + location / { + proxy_pass http://unix:/run/powerdns-admin/socket; + proxy_read_timeout 120; + proxy_connect_timeout 120; + } + +} diff --git a/roles/PowerDNS.admin/templates/powerdns-admin_config_nginx_https.j2 b/roles/PowerDNS.admin/templates/powerdns-admin_config_nginx_https.j2 new file mode 100644 index 0000000000000000000000000000000000000000..3eebc6c94a14337a3596e3fb3f4e1dd4ff3a592b --- /dev/null +++ b/roles/PowerDNS.admin/templates/powerdns-admin_config_nginx_https.j2 @@ -0,0 +1,52 @@ +server { + listen 80 default_server; + server_name {{ pdnsadmin_webname }}; + return 301 https://{{ pdnsadmin_webname }}$request_uri; +} + +server { + listen *:{{ pdnsadmin_webport }} ssl http2 default_server; + server_name {{ pdnsadmin_webname }}; + index index.html index.htm index.php; + root {{ pdnsadmin_basedir }}/{{ pdnsadmin_destdir }}; + access_log /var/log/nginx/pdnsadmin_access.log combined; + error_log /var/log/nginx/pdnsadmin_error.log; + + ssl_certificate /etc/ssl/{{ pdnsadmin_webname }}.crt; + ssl_certificate_key /etc/ssl/{{ pdnsadmin_webname }}.key; +# ssl_dhparam path_to_your_dhparam.pem; + ssl_prefer_server_ciphers on; + ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH'; + ssl_session_cache shared:SSL:10m; +# ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + + client_max_body_size 10m; + client_body_buffer_size 128k; + proxy_redirect off; + proxy_connect_timeout 90; + proxy_send_timeout 90; + proxy_read_timeout 90; + proxy_buffers 32 4k; + proxy_buffer_size 8k; + proxy_set_header Host $host; + proxy_set_header X-Scheme $scheme; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_headers_hash_bucket_size 64; + + location ~ ^/static/ { + include /etc/nginx/mime.types; + root {{ pdnsadmin_basedir }}/{{ pdnsadmin_destdir }}/powerdnsadmin; + location ~* \.(jpg|jpeg|png|gif)$ { expires 365d; } + location ~* ^.+.(css|js)$ { expires 7d; } + } + + location / { + proxy_pass http://unix:/run/powerdns-admin/socket; + proxy_read_timeout 120; + proxy_connect_timeout 120; + proxy_redirect http:// $scheme://; + } + +} diff --git a/roles/PowerDNS.admin/templates/powerdns-admin_service_nginx.j2 b/roles/PowerDNS.admin/templates/powerdns-admin_service_nginx.j2 new file mode 100644 index 0000000000000000000000000000000000000000..b43bfb9f9d2bf3866d5c038c5a0c14f87a703ec4 --- /dev/null +++ b/roles/PowerDNS.admin/templates/powerdns-admin_service_nginx.j2 @@ -0,0 +1,20 @@ +[Unit] +Description=PowerDNS-Admin +Requires=powerdns-admin.socket +After=network.target + +[Service] +Environment="FLASK_CONF=../configs/production.py" +PIDFile=/run/powerdns-admin/pid +User={{ pdnsadmin_usr }} +Group={{ pdnsadmin_grp }} +WorkingDirectory={{ pdnsadmin_basedir }}/{{ pdnsadmin_destdir }} +ExecStartPre=+mkdir -p /run/powerdns-admin/ +ExecStartPre=+chown {{ pdnsadmin_usr }}:{{ pdnsadmin_grp }} -R /run/powerdns-admin/ +ExecStart={{ pdnsadmin_basedir }}/{{ pdnsadmin_destdir }}/flask/bin/gunicorn --pid /run/powerdns-admin/pid --bind unix:/run/powerdns-admin/socket 'powerdnsadmin:create_app()' +ExecReload=/bin/kill -s HUP $MAINPID +ExecStop=/bin/kill -s TERM $MAINPID +PrivateTmp=true + +[Install] +WantedBy=multi-user.target diff --git a/roles/PowerDNS.admin/templates/powerdns-admin_socket_nginx.j2 b/roles/PowerDNS.admin/templates/powerdns-admin_socket_nginx.j2 new file mode 100644 index 0000000000000000000000000000000000000000..5eb01ff4312ea767150ce26eb724e358bc9ac05a --- /dev/null +++ b/roles/PowerDNS.admin/templates/powerdns-admin_socket_nginx.j2 @@ -0,0 +1,8 @@ +[Unit] +Description=PowerDNS-Admin socket + +[Socket] +ListenStream=/run/powerdns-admin/socket + +[Install] +WantedBy=sockets.target diff --git a/roles/PowerDNS.admin/templates/powerdns-admin_tmpfile_nginx.j2 b/roles/PowerDNS.admin/templates/powerdns-admin_tmpfile_nginx.j2 new file mode 100644 index 0000000000000000000000000000000000000000..3b29909d4c7b52a8a1f0bacf91d0dc4a49ae8238 --- /dev/null +++ b/roles/PowerDNS.admin/templates/powerdns-admin_tmpfile_nginx.j2 @@ -0,0 +1 @@ +d /run/powerdns-admin 0755 {{ pdnsadmin_usr }} {{ pdnsadmin_grp }} - diff --git a/roles/PowerDNS.admin/vars/Debian.yml b/roles/PowerDNS.admin/vars/Debian.yml index da83094ea96523f8c2cdb33a5a887568fb9390b9..5f0d03e5c961f65875f9c888521d931a5a830ec0 100644 --- a/roles/PowerDNS.admin/vars/Debian.yml +++ b/roles/PowerDNS.admin/vars/Debian.yml @@ -5,6 +5,7 @@ extrakeys: extrarepos: - "deb https://dl.yarnpkg.com/debian/ stable main" +# see: https://github.com/PowerDNS-Admin/PowerDNS-Admin/blob/master/docs/wiki/install/Running-PowerDNS-Admin-on-Ubuntu-or-Debian.md extrapackages: - git - virtualenv @@ -12,9 +13,13 @@ extrapackages: - yarn - python3-dev - python-setuptools - - libmysqlclient-dev - libsasl2-dev - libldap2-dev + - python3-venv + - libmariadb-dev + - build-essential + - curl + - libpq-dev - libssl-dev - libxml2-dev - libxslt1-dev @@ -22,5 +27,5 @@ extrapackages: - libffi-dev - pkg-config -apache_pkg_name: apache2 -apache_srv_name: apache2 +nginx_pkg_name: nginx +nginx_srv_name: nginx diff --git a/roles/PowerDNS.pdns/.github/dependabot.yml b/roles/PowerDNS.pdns/.github/dependabot.yml new file mode 100644 index 0000000000000000000000000000000000000000..dee142cd5edc4aacc4669bb31ea812f11e987684 --- /dev/null +++ b/roles/PowerDNS.pdns/.github/dependabot.yml @@ -0,0 +1,16 @@ +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: +- package-ecosystem: github-actions + directory: "/" + schedule: + interval: daily + timezone: Europe/Amsterdam + open-pull-requests-limit: 5 +- package-ecosystem: pip + directory: "/" + schedule: + interval: daily + timezone: Europe/Amsterdam + open-pull-requests-limit: 5 diff --git a/roles/PowerDNS.pdns/.github/workflows/main.yml b/roles/PowerDNS.pdns/.github/workflows/main.yml index 1efa80d117d7e99bba9c6be2bcea81503f67beba..1db38267fb72d456b08f66959f8d32185309b7c1 100644 --- a/roles/PowerDNS.pdns/.github/workflows/main.yml +++ b/roles/PowerDNS.pdns/.github/workflows/main.yml @@ -2,6 +2,8 @@ on: push: pull_request: + schedule: + - cron: '33 5 * * 0' jobs: Tests: @@ -10,22 +12,23 @@ jobs: strategy: matrix: ansible: - - '2.9' - - '2.10' - - '2.11' + - "2.12" + - "2.13" + - "2.14" scenario: - - pdns-43 - - pdns-44 + - pdns-46 + - pdns-47 + - pdns-48 - pdns-master - pdns-os-repos - systemd-no-overrides steps: - name: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Install python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: - python-version: 3.6 + python-version: "3.10" - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/roles/PowerDNS.pdns/.gitignore b/roles/PowerDNS.pdns/.gitignore index b31443cce89dc9c3b14f318db9b38f41d7d92d33..3adf759900af40a0717da904ed14a27b60c21dd5 100644 --- a/roles/PowerDNS.pdns/.gitignore +++ b/roles/PowerDNS.pdns/.gitignore @@ -14,3 +14,6 @@ __pycache__/ .cache .molecule .vagrant + +#venv +venv diff --git a/roles/PowerDNS.pdns/CHANGELOG.md b/roles/PowerDNS.pdns/CHANGELOG.md index 5013113b83ee329db6ed18bb96843000ca557509..130ebd42ea6b69a360b23e30c64a06eb898a3f15 100644 --- a/roles/PowerDNS.pdns/CHANGELOG.md +++ b/roles/PowerDNS.pdns/CHANGELOG.md @@ -1,3 +1,26 @@ +## v1.8.0 (2023-08-03) + +NEW FEATURES: +- Added pdns48 repository and CI ([\#180](https://github.com/PowerDNS/pdns-ansible/pull/180)) +- Added support for OL9 ([\#145](https://github.com/PowerDNS/pdns-ansible/pull/145)) +- Added pdns47 repository and CI ([\#135](https://github.com/PowerDNS/pdns-ansible/pull/135)) +- Replaced Centos8 with OL8 ([\#133](https://github.com/PowerDNS/pdns-ansible/pull/133)) +- Added pdns46 repository and CI ([\#117](https://github.com/PowerDNS/pdns-ansible/pull/117)) + +IMPROVEMENTS: +- Bump versions and various fixes in CI and README.md ([\#179](https://github.com/PowerDNS/pdns-ansible/pull/179) +- Bump versions in requirements.txt ([\#144](https://github.com/PowerDNS/pdns-ansible/pull/144)) +- Removal of deprecation warning ([\#121](https://github.com/PowerDNS/pdns-ansible/pull/121)) +- Do not restart all servers at once ([\#109](https://github.com/PowerDNS/pdns-ansible/pull/109)) +- Prevent logging of password information ([\#106](https://github.com/PowerDNS/pdns-ansible/pull/106)) + +REMOVED FEATURES: +- Drop pdns45, support for Debian 9 ([\#179](https://github.com/PowerDNS/pdns-ansible/pull/179)) EOL +- Drop Ansible v2.9 - v2.10 - v2.11 from CI and removed pdns43 and pdns44 ([\#144](https://github.com/PowerDNS/pdns-ansible/pull/144)) for EOL + +BUG FIXES: +- Add MySQL schema path with PowerDNS 4.6 and Rocky Linux 8 with EPEL package installation ([\#114](https://github.com/PowerDNS/pdns-ansible/pull/114)) + ## v1.7.0 (2021-07-01) NEW FEATURES: diff --git a/roles/PowerDNS.pdns/README.md b/roles/PowerDNS.pdns/README.md index 992ffe41ebc11281ebe701deae95f524349127cd..498d3be2f0dd1a9b1e2e1ecedd51f18ae3c3ac31 100644 --- a/roles/PowerDNS.pdns/README.md +++ b/roles/PowerDNS.pdns/README.md @@ -9,7 +9,7 @@ An Ansible role created by the folks behind PowerDNS to setup the [PowerDNS Auth ## Requirements -An Ansible 2.9 or higher installation. +An Ansible 2.12 or higher installation. ## Dependencies @@ -32,17 +32,23 @@ By default, the PowerDNS Authoritative Server is installed from the software rep - { role: PowerDNS.pdns, pdns_install_repo: "{{ pdns_auth_powerdns_repo_master }}" -# Install the PowerDNS Authoritative Server from the '4.3.x' official repository +# Install the PowerDNS Authoritative Server from the '4.6.x' official repository - hosts: all roles: - { role: PowerDNS.pdns, - pdns_install_repo: "{{ pdns_auth_powerdns_repo_43 }}" + pdns_install_repo: "{{ pdns_auth_powerdns_repo_46 }}" -# Install the PowerDNS Authoritative Server from the '4.4.x' official repository +# Install the PowerDNS Authoritative Server from the '4.7.x' official repository - hosts: all roles: - { role: PowerDNS.pdns, - pdns_install_repo: "{{ pdns_auth_powerdns_repo_44 }}" + pdns_install_repo: "{{ pdns_auth_powerdns_repo_47 }}" + +# Install the PowerDNS Authoritative Server from the '4.8.x' official repository +- hosts: all + roles: + - { role: PowerDNS.pdns, + pdns_install_repo: "{{ pdns_auth_powerdns_repo_48 }}" ``` The examples above, show how to install the PowerDNS Authoritative Server from the official PowerDNS repositories @@ -347,7 +353,7 @@ To test all the scenarios run To run a custom molecule command - $ tox -e ansible210 -- molecule test -s pdns-44 + $ tox -e ansible214 -- molecule test -s pdns-48 ## License diff --git a/roles/PowerDNS.pdns/meta/.galaxy_install_info b/roles/PowerDNS.pdns/meta/.galaxy_install_info index 27985b8e302b07176e2158c72490a072e77378ad..2743d23662634245002cee095027993faa76119d 100644 --- a/roles/PowerDNS.pdns/meta/.galaxy_install_info +++ b/roles/PowerDNS.pdns/meta/.galaxy_install_info @@ -1,2 +1,2 @@ -install_date: Fri Jul 16 14:49:06 2021 -version: v1.7.0 +install_date: 'Wed 29 Nov 2023 11:19:17 AM ' +version: v1.8.0 diff --git a/roles/PowerDNS.pdns/meta/main.yml b/roles/PowerDNS.pdns/meta/main.yml index 7f57787c0624622fd4d436357eaf740583199a1e..6af15a16c527c4b59d8e61eb1fa0029a77537866 100644 --- a/roles/PowerDNS.pdns/meta/main.yml +++ b/roles/PowerDNS.pdns/meta/main.yml @@ -1,13 +1,13 @@ --- galaxy_info: - namespace: powerdns - role_name: pdns + role_name: "pdns" + namespace: "powerdns" author: PowerDNS Engineering Team description: Install and configure the PowerDNS Authoritative DNS Server company: PowerDNS.COM BV license: MIT - min_ansible_version: 2.9 + min_ansible_version: "2.12" platforms: - name: EL versions: diff --git a/roles/PowerDNS.pdns/molecule/pdns-43/converge.yml b/roles/PowerDNS.pdns/molecule/pdns-46/converge.yml similarity index 63% rename from roles/PowerDNS.pdns/molecule/pdns-43/converge.yml rename to roles/PowerDNS.pdns/molecule/pdns-46/converge.yml index 5012f0afa0f332b4e8d7e223ce93726ec3766bbe..1a5a70c87f5123beef16b8a52783a44024aa4215 100644 --- a/roles/PowerDNS.pdns/molecule/pdns-43/converge.yml +++ b/roles/PowerDNS.pdns/molecule/pdns-46/converge.yml @@ -3,7 +3,7 @@ - hosts: pdns vars_files: - ../resources/vars/pdns-common.yml - - ../resources/vars/pdns-repo-43.yml + - ../resources/vars/pdns-repo-46.yml - ../resources/vars/pdns-backends.yml roles: - - { role: pdns-ansible } + - { role: powerdns.pdns } diff --git a/roles/PowerDNS.pdns/molecule/pdns-43/molecule.yml b/roles/PowerDNS.pdns/molecule/pdns-46/molecule.yml similarity index 83% rename from roles/PowerDNS.pdns/molecule/pdns-43/molecule.yml rename to roles/PowerDNS.pdns/molecule/pdns-46/molecule.yml index fa27e98a210430e09cbcc7890612a6c06e39784a..f6746adc6d5ece571d731e5443b54fb9dceb7f5e 100644 --- a/roles/PowerDNS.pdns/molecule/pdns-43/molecule.yml +++ b/roles/PowerDNS.pdns/molecule/pdns-46/molecule.yml @@ -1,7 +1,7 @@ --- scenario: - name: pdns-43 + name: pdns-46 driver: name: docker @@ -15,25 +15,31 @@ platforms: image: centos:7 dockerfile_tpl: centos-systemd - - name: centos-8 + - name: oraclelinux-8 groups: ["pdns"] - image: centos:8 + image: oraclelinux:8 dockerfile_tpl: centos-systemd - - name: ubuntu-1804 + - name: ubuntu-2004 groups: ["pdns"] - image: ubuntu:18.04 - dockerfile_tpl: debian-systemd - - - name: debian-9 - groups: ["pdns"] - image: debian:9 + image: ubuntu:20.04 + tmpfs: + - /run + - /tmp dockerfile_tpl: debian-systemd - name: debian-10 groups: ["pdns"] image: debian:10 + privileged: True + volume_mounts: + - "/sys/fs/cgroup:/sys/fs/cgroup:rw" + tmpfs: + - /run + - /run/lock + - /tmp dockerfile_tpl: debian-systemd + environment: { container: docker } # In order to run the tests we need # a MySQL container to be up & running @@ -81,8 +87,8 @@ verifier: directory: ../resources/tests/all additional_files_or_dirs: # path relative to 'directory' - - ../repo-43/ + - ../repo-46/ - ../backend-sqlite/ - ../backend-mysql/ - ../systemd-override/ - lint: flake8 + diff --git a/roles/PowerDNS.pdns/molecule/pdns-44/converge.yml b/roles/PowerDNS.pdns/molecule/pdns-47/converge.yml similarity index 63% rename from roles/PowerDNS.pdns/molecule/pdns-44/converge.yml rename to roles/PowerDNS.pdns/molecule/pdns-47/converge.yml index 1b511c1d16e8a6a434666523ddadaa7408b31834..25ec529103b438f69ce5f83dcd5297a3db68a879 100644 --- a/roles/PowerDNS.pdns/molecule/pdns-44/converge.yml +++ b/roles/PowerDNS.pdns/molecule/pdns-47/converge.yml @@ -3,7 +3,7 @@ - hosts: pdns vars_files: - ../resources/vars/pdns-common.yml - - ../resources/vars/pdns-repo-44.yml + - ../resources/vars/pdns-repo-47.yml - ../resources/vars/pdns-backends.yml roles: - - { role: pdns-ansible } + - { role: powerdns.pdns } diff --git a/roles/PowerDNS.pdns/molecule/pdns-44/molecule.yml b/roles/PowerDNS.pdns/molecule/pdns-47/molecule.yml similarity index 88% rename from roles/PowerDNS.pdns/molecule/pdns-44/molecule.yml rename to roles/PowerDNS.pdns/molecule/pdns-47/molecule.yml index 1c2225861360ed6c772c80789e9aecb5250828fe..87b30814d33d19ba16f0d7d8137a10ec0a402180 100644 --- a/roles/PowerDNS.pdns/molecule/pdns-44/molecule.yml +++ b/roles/PowerDNS.pdns/molecule/pdns-47/molecule.yml @@ -1,7 +1,7 @@ --- scenario: - name: pdns-44 + name: pdns-47 driver: name: docker @@ -15,15 +15,15 @@ platforms: image: centos:7 dockerfile_tpl: centos-systemd - - name: centos-8 + - name: oraclelinux-9 groups: ["pdns"] - image: centos:8 + image: oraclelinux:9 dockerfile_tpl: centos-systemd - - name: ubuntu-1804 + - name: oraclelinux-8 groups: ["pdns"] - image: ubuntu:18.04 - dockerfile_tpl: debian-systemd + image: oraclelinux:8 + dockerfile_tpl: centos-systemd - name: ubuntu-2004 groups: ["pdns"] @@ -33,11 +33,6 @@ platforms: - /tmp dockerfile_tpl: debian-systemd - - name: debian-9 - groups: ["pdns"] - image: debian:9 - dockerfile_tpl: debian-systemd - - name: debian-10 groups: ["pdns"] image: debian:10 @@ -97,8 +92,8 @@ verifier: directory: ../resources/tests/all additional_files_or_dirs: # path relative to 'directory' - - ../repo-44/ + - ../repo-47/ - ../backend-sqlite/ - ../backend-mysql/ - ../systemd-override/ - lint: flake8 + diff --git a/roles/PowerDNS.pdns/molecule/pdns-48/converge.yml b/roles/PowerDNS.pdns/molecule/pdns-48/converge.yml new file mode 100644 index 0000000000000000000000000000000000000000..1aa3a4bb78e0426b59ba439c280185f526caf5f9 --- /dev/null +++ b/roles/PowerDNS.pdns/molecule/pdns-48/converge.yml @@ -0,0 +1,9 @@ +--- + +- hosts: pdns + vars_files: + - ../resources/vars/pdns-common.yml + - ../resources/vars/pdns-repo-48.yml + - ../resources/vars/pdns-backends.yml + roles: + - { role: powerdns.pdns } diff --git a/roles/PowerDNS.pdns/molecule/pdns-48/molecule.yml b/roles/PowerDNS.pdns/molecule/pdns-48/molecule.yml new file mode 100644 index 0000000000000000000000000000000000000000..3b4fd7d8270b658aac0ddca1ad50a3cc7c6feaf6 --- /dev/null +++ b/roles/PowerDNS.pdns/molecule/pdns-48/molecule.yml @@ -0,0 +1,99 @@ +--- + +scenario: + name: pdns-48 + +driver: + name: docker + +dependency: + name: galaxy + +platforms: + - name: centos-7 + groups: ["pdns"] + image: centos:7 + dockerfile_tpl: centos-systemd + + - name: oraclelinux-9 + groups: ["pdns"] + image: oraclelinux:9 + dockerfile_tpl: centos-systemd + + - name: oraclelinux-8 + groups: ["pdns"] + image: oraclelinux:8 + dockerfile_tpl: centos-systemd + + - name: ubuntu-2004 + groups: ["pdns"] + image: ubuntu:20.04 + tmpfs: + - /run + - /tmp + dockerfile_tpl: debian-systemd + + - name: debian-10 + groups: ["pdns"] + image: debian:10 + privileged: True + volume_mounts: + - "/sys/fs/cgroup:/sys/fs/cgroup:rw" + tmpfs: + - /run + - /run/lock + - /tmp + dockerfile_tpl: debian-systemd + environment: { container: docker } + + # In order to run the tests we need + # a MySQL container to be up & running + - name: mysql + image: mysql:5.7 + env: + MYSQL_ROOT_PASSWORD: pdns + # Declaring the container as service, + # will link it to the others Platforms containers + # on creation. + is_service: yes + +provisioner: + name: ansible + options: + diff: True + v: True + config_options: + defaults: + gathering: smart + fact_caching: jsonfile + fact_caching_connection: .ansible_cache + fact_caching_timeout: 7200 + ssh_connection: + pipelining: true + inventory: + links: + host_vars: ../resources/host_vars/ + playbooks: + create: ../resources/create.yml + destroy: ../resources/destroy.yml + prepare: ../resources/prepare.yml + # "systemctl used in place of systemd module" "ANSIBLE0006" + # "Tasks that run when changed should likely be handlers" "ANSIBLE0016" + # "Shells that use pipes should set the pipefail option" "306" + lint: ansible-lint -x ANSIBLE0006 ANSIBLE0016 306 + +lint: yamllint defaults tasks meta vars + +verifier: + name: testinfra + options: + hosts: "pdns" + vvv: True + directory: ../resources/tests/all + additional_files_or_dirs: + # path relative to 'directory' + - ../repo-48/ + - ../backend-sqlite/ + - ../backend-mysql/ + - ../systemd-override/ + diff --git a/roles/PowerDNS.pdns/molecule/pdns-master/converge.yml b/roles/PowerDNS.pdns/molecule/pdns-master/converge.yml index 47df9713aa6af609d354f0ffe83dc9185ac0c600..d4669bc4100e4cc00460248a999118bccae58bb5 100644 --- a/roles/PowerDNS.pdns/molecule/pdns-master/converge.yml +++ b/roles/PowerDNS.pdns/molecule/pdns-master/converge.yml @@ -6,4 +6,4 @@ - ../resources/vars/pdns-repo-master.yml - ../resources/vars/pdns-backends.yml roles: - - { role: pdns-ansible } + - { role: powerdns.pdns } diff --git a/roles/PowerDNS.pdns/molecule/pdns-master/molecule.yml b/roles/PowerDNS.pdns/molecule/pdns-master/molecule.yml index 927ad4eadc2282dce6f02a46cbd7ea54e896eaeb..6e295f28c8a7a64c64101c52986ac78a66d6cf00 100644 --- a/roles/PowerDNS.pdns/molecule/pdns-master/molecule.yml +++ b/roles/PowerDNS.pdns/molecule/pdns-master/molecule.yml @@ -15,19 +15,19 @@ platforms: image: centos:7 dockerfile_tpl: centos-systemd - - name: centos-8 + - name: oraclelinux-9 groups: ["pdns"] - image: centos:8 + image: oraclelinux:9 dockerfile_tpl: centos-systemd - - name: ubuntu-1804 + - name: oraclelinux-8 groups: ["pdns"] - image: ubuntu:18.04 - dockerfile_tpl: debian-systemd + image: oraclelinux:8 + dockerfile_tpl: centos-systemd - - name: debian-9 + - name: ubuntu-1804 groups: ["pdns"] - image: debian:9 + image: ubuntu:18.04 dockerfile_tpl: debian-systemd - name: debian-10 @@ -82,4 +82,4 @@ verifier: - ../backend-sqlite/ - ../backend-mysql/ - ../systemd-override/ - lint: flake8 + diff --git a/roles/PowerDNS.pdns/molecule/pdns-os-repos/converge.yml b/roles/PowerDNS.pdns/molecule/pdns-os-repos/converge.yml index fecc3bb93df073716aaf75240a0498fa10db64b7..753bd5d3fa9a067b29ff76c44996cfee2f38af03 100644 --- a/roles/PowerDNS.pdns/molecule/pdns-os-repos/converge.yml +++ b/roles/PowerDNS.pdns/molecule/pdns-os-repos/converge.yml @@ -4,4 +4,4 @@ - ../resources/vars/pdns-common.yml - ../resources/vars/pdns-backends.yml roles: - - { role: pdns-ansible } + - { role: powerdns.pdns } diff --git a/roles/PowerDNS.pdns/molecule/pdns-os-repos/molecule.yml b/roles/PowerDNS.pdns/molecule/pdns-os-repos/molecule.yml index 7d7b66eb513ab01f5799e730f508d4aa3973e459..f35af49c4cbf0b04d68609026c46d2d8f8898cc4 100644 --- a/roles/PowerDNS.pdns/molecule/pdns-os-repos/molecule.yml +++ b/roles/PowerDNS.pdns/molecule/pdns-os-repos/molecule.yml @@ -71,4 +71,4 @@ verifier: - ../systemd-override/ - ../backend-sqlite/ - ../backend-mysql/ - lint: flake8 + diff --git a/roles/PowerDNS.pdns/molecule/resources/tests/all/test_common.py b/roles/PowerDNS.pdns/molecule/resources/tests/all/test_common.py index 8080602efe7b647713b7f53a48ee06cd65b53164..e56f1e979cd366e47f24f5b083accfc151d15d59 100644 --- a/roles/PowerDNS.pdns/molecule/resources/tests/all/test_common.py +++ b/roles/PowerDNS.pdns/molecule/resources/tests/all/test_common.py @@ -1,6 +1,6 @@ debian_os = ['debian', 'ubuntu'] -rhel_os = ['redhat', 'centos'] +rhel_os = ['redhat', 'centos', 'ol'] archlinux_os = ['arch'] diff --git a/roles/PowerDNS.pdns/molecule/resources/tests/backend-mysql/test_backend_mysql.py b/roles/PowerDNS.pdns/molecule/resources/tests/backend-mysql/test_backend_mysql.py index c1e902a96ee5e8db81b9e2734a3de57dedf8915f..be61d8813966d5ca69df5cee00930301fcee1994 100644 --- a/roles/PowerDNS.pdns/molecule/resources/tests/backend-mysql/test_backend_mysql.py +++ b/roles/PowerDNS.pdns/molecule/resources/tests/backend-mysql/test_backend_mysql.py @@ -1,6 +1,6 @@ debian_os = ['debian', 'ubuntu'] -rhel_os = ['redhat', 'centos'] +rhel_os = ['redhat', 'centos', 'ol'] archlinux_os = ['arch'] diff --git a/roles/PowerDNS.pdns/molecule/resources/tests/backend-sqlite/test_backend_sqlite.py b/roles/PowerDNS.pdns/molecule/resources/tests/backend-sqlite/test_backend_sqlite.py index 2527b90f30133d8aacf2da34d396c91f3e0aa42c..7ac4bb427f81aa5c3f14cbbe98f374da0a1bb342 100644 --- a/roles/PowerDNS.pdns/molecule/resources/tests/backend-sqlite/test_backend_sqlite.py +++ b/roles/PowerDNS.pdns/molecule/resources/tests/backend-sqlite/test_backend_sqlite.py @@ -1,6 +1,6 @@ debian_os = ['debian', 'ubuntu'] -rhel_os = ['redhat', 'centos'] +rhel_os = ['redhat', 'centos', 'ol'] archlinux_os = ['arch'] diff --git a/roles/PowerDNS.pdns/molecule/resources/tests/repo-43/test_repo_43.py b/roles/PowerDNS.pdns/molecule/resources/tests/pdns-48/test_repo_48.py similarity index 73% rename from roles/PowerDNS.pdns/molecule/resources/tests/repo-43/test_repo_43.py rename to roles/PowerDNS.pdns/molecule/resources/tests/pdns-48/test_repo_48.py index 6528205eacc85cd13eb175afbd6c6176aff79f84..c4544ffde9190f514896d1c594eb6b583d9f5484 100644 --- a/roles/PowerDNS.pdns/molecule/resources/tests/repo-43/test_repo_43.py +++ b/roles/PowerDNS.pdns/molecule/resources/tests/pdns-48/test_repo_48.py @@ -1,14 +1,14 @@ debian_os = ['debian', 'ubuntu'] -rhel_os = ['redhat', 'centos'] +rhel_os = ['redhat', 'centos', 'ol'] def test_repo_file(host): f = None if host.system_info.distribution.lower() in debian_os: - f = host.file('/etc/apt/sources.list.d/powerdns-auth-43.list') + f = host.file('/etc/apt/sources.list.d/powerdns-auth-48.list') if host.system_info.distribution.lower() in rhel_os: - f = host.file('/etc/yum.repos.d/powerdns-auth-43.repo') + f = host.file('/etc/yum.repos.d/powerdns-auth-48.repo') assert f.exists assert f.user == 'root' @@ -18,12 +18,12 @@ def test_repo_file(host): def test_pdns_repo(host): f = None if host.system_info.distribution.lower() in debian_os: - f = host.file('/etc/apt/sources.list.d/powerdns-auth-43.list') + f = host.file('/etc/apt/sources.list.d/powerdns-auth-48.list') if host.system_info.distribution.lower() in rhel_os: - f = host.file('/etc/yum.repos.d/powerdns-auth-43.repo') + f = host.file('/etc/yum.repos.d/powerdns-auth-48.repo') assert f.exists - assert f.contains('auth-43') + assert f.contains('auth-48') def test_repo_pinning_file(host): @@ -41,4 +41,4 @@ def test_pdns_version(host): cmd = host.run('/usr/sbin/pdns_server --version') assert 'PowerDNS Authoritative Server' in cmd.stderr - assert '4.3' in cmd.stderr + assert '4.8' in cmd.stderr diff --git a/roles/PowerDNS.pdns/molecule/resources/tests/repo-44/test_repo_44.py b/roles/PowerDNS.pdns/molecule/resources/tests/repo-45/test_repo_45.py similarity index 73% rename from roles/PowerDNS.pdns/molecule/resources/tests/repo-44/test_repo_44.py rename to roles/PowerDNS.pdns/molecule/resources/tests/repo-45/test_repo_45.py index 6d5dac9b05018598e96a84a466ee4724133d7a0c..cc60c8fe0169104086b47037e1f50b81e3c70e53 100644 --- a/roles/PowerDNS.pdns/molecule/resources/tests/repo-44/test_repo_44.py +++ b/roles/PowerDNS.pdns/molecule/resources/tests/repo-45/test_repo_45.py @@ -1,14 +1,14 @@ debian_os = ['debian', 'ubuntu'] -rhel_os = ['redhat', 'centos'] +rhel_os = ['redhat', 'centos', 'ol'] def test_repo_file(host): f = None if host.system_info.distribution.lower() in debian_os: - f = host.file('/etc/apt/sources.list.d/powerdns-auth-44.list') + f = host.file('/etc/apt/sources.list.d/powerdns-auth-45.list') if host.system_info.distribution.lower() in rhel_os: - f = host.file('/etc/yum.repos.d/powerdns-auth-44.repo') + f = host.file('/etc/yum.repos.d/powerdns-auth-45.repo') assert f.exists assert f.user == 'root' @@ -18,12 +18,12 @@ def test_repo_file(host): def test_pdns_repo(host): f = None if host.system_info.distribution.lower() in debian_os: - f = host.file('/etc/apt/sources.list.d/powerdns-auth-44.list') + f = host.file('/etc/apt/sources.list.d/powerdns-auth-45.list') if host.system_info.distribution.lower() in rhel_os: - f = host.file('/etc/yum.repos.d/powerdns-auth-44.repo') + f = host.file('/etc/yum.repos.d/powerdns-auth-45.repo') assert f.exists - assert f.contains('auth-44') + assert f.contains('auth-45') def test_repo_pinning_file(host): @@ -41,4 +41,4 @@ def test_pdns_version(host): cmd = host.run('/usr/sbin/pdns_server --version') assert 'PowerDNS Authoritative Server' in cmd.stderr - assert '4.4' in cmd.stderr + assert '4.5' in cmd.stderr diff --git a/roles/PowerDNS.pdns/molecule/resources/tests/repo-46/test_repo_46.py b/roles/PowerDNS.pdns/molecule/resources/tests/repo-46/test_repo_46.py new file mode 100644 index 0000000000000000000000000000000000000000..e1de5edca9befd4d955e5375368816d8a1a19cb3 --- /dev/null +++ b/roles/PowerDNS.pdns/molecule/resources/tests/repo-46/test_repo_46.py @@ -0,0 +1,44 @@ + +debian_os = ['debian', 'ubuntu'] +rhel_os = ['redhat', 'centos', 'ol'] + + +def test_repo_file(host): + f = None + if host.system_info.distribution.lower() in debian_os: + f = host.file('/etc/apt/sources.list.d/powerdns-auth-46.list') + if host.system_info.distribution.lower() in rhel_os: + f = host.file('/etc/yum.repos.d/powerdns-auth-46.repo') + + assert f.exists + assert f.user == 'root' + assert f.group == 'root' + + +def test_pdns_repo(host): + f = None + if host.system_info.distribution.lower() in debian_os: + f = host.file('/etc/apt/sources.list.d/powerdns-auth-46.list') + if host.system_info.distribution.lower() in rhel_os: + f = host.file('/etc/yum.repos.d/powerdns-auth-46.repo') + + assert f.exists + assert f.contains('auth-46') + + +def test_repo_pinning_file(host): + if host.system_info.distribution.lower() in debian_os: + f = host.file('/etc/apt/preferences.d/pdns') + assert f.exists + assert f.user == 'root' + assert f.group == 'root' + f.contains('Package: pdns-*') + f.contains('Pin: origin repo.powerdns.com') + f.contains('Pin-Priority: 600') + + +def test_pdns_version(host): + cmd = host.run('/usr/sbin/pdns_server --version') + + assert 'PowerDNS Authoritative Server' in cmd.stderr + assert '4.6' in cmd.stderr diff --git a/roles/PowerDNS.pdns/molecule/resources/tests/repo-47/test_repo_47.py b/roles/PowerDNS.pdns/molecule/resources/tests/repo-47/test_repo_47.py new file mode 100644 index 0000000000000000000000000000000000000000..4cb8008fb2ad0a5abcd076044c66f55c7a0f1b26 --- /dev/null +++ b/roles/PowerDNS.pdns/molecule/resources/tests/repo-47/test_repo_47.py @@ -0,0 +1,44 @@ + +debian_os = ['debian', 'ubuntu'] +rhel_os = ['redhat', 'centos', 'ol'] + + +def test_repo_file(host): + f = None + if host.system_info.distribution.lower() in debian_os: + f = host.file('/etc/apt/sources.list.d/powerdns-auth-47.list') + if host.system_info.distribution.lower() in rhel_os: + f = host.file('/etc/yum.repos.d/powerdns-auth-47.repo') + + assert f.exists + assert f.user == 'root' + assert f.group == 'root' + + +def test_pdns_repo(host): + f = None + if host.system_info.distribution.lower() in debian_os: + f = host.file('/etc/apt/sources.list.d/powerdns-auth-47.list') + if host.system_info.distribution.lower() in rhel_os: + f = host.file('/etc/yum.repos.d/powerdns-auth-47.repo') + + assert f.exists + assert f.contains('auth-47') + + +def test_repo_pinning_file(host): + if host.system_info.distribution.lower() in debian_os: + f = host.file('/etc/apt/preferences.d/pdns') + assert f.exists + assert f.user == 'root' + assert f.group == 'root' + f.contains('Package: pdns-*') + f.contains('Pin: origin repo.powerdns.com') + f.contains('Pin-Priority: 600') + + +def test_pdns_version(host): + cmd = host.run('/usr/sbin/pdns_server --version') + + assert 'PowerDNS Authoritative Server' in cmd.stderr + assert '4.7' in cmd.stderr diff --git a/roles/PowerDNS.pdns/molecule/resources/tests/repo-master/test_repo_master.py b/roles/PowerDNS.pdns/molecule/resources/tests/repo-master/test_repo_master.py index 8ebaebacaa1c47850e4c91c4150f19d0c4fd26f0..dcd91e844c0235a575423401178253aac060a1c0 100644 --- a/roles/PowerDNS.pdns/molecule/resources/tests/repo-master/test_repo_master.py +++ b/roles/PowerDNS.pdns/molecule/resources/tests/repo-master/test_repo_master.py @@ -1,6 +1,6 @@ debian_os = ['debian', 'ubuntu'] -rhel_os = ['redhat', 'centos'] +rhel_os = ['redhat', 'centos', 'ol'] def test_repo_file(host): diff --git a/roles/PowerDNS.pdns/molecule/resources/vars/pdns-no-overrides.yml b/roles/PowerDNS.pdns/molecule/resources/vars/pdns-no-overrides.yml index 381802827e7b52e28c7b3b2bbe73203509ef309b..78e3d7e3a84236768d927671c5bf9ad9979f48c7 100644 --- a/roles/PowerDNS.pdns/molecule/resources/vars/pdns-no-overrides.yml +++ b/roles/PowerDNS.pdns/molecule/resources/vars/pdns-no-overrides.yml @@ -22,5 +22,5 @@ pdns_config: webserver-address: "0.0.0.0" webserver-port: "8001" -pdns_install_repo: "{{ pdns_auth_powerdns_repo_44 }}" +pdns_install_repo: "{{ pdns_auth_powerdns_repo_48 }}" pdns_service_overrides: '' diff --git a/roles/PowerDNS.pdns/molecule/resources/vars/pdns-repo-43.yml b/roles/PowerDNS.pdns/molecule/resources/vars/pdns-repo-43.yml deleted file mode 100644 index 8518de409516f6a9d5da4a3c3ee585beb4772a19..0000000000000000000000000000000000000000 --- a/roles/PowerDNS.pdns/molecule/resources/vars/pdns-repo-43.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- - -## -# PowerDNS 4.3.x Repository -## - -pdns_install_repo: "{{ pdns_auth_powerdns_repo_43 }}" diff --git a/roles/PowerDNS.pdns/molecule/resources/vars/pdns-repo-44.yml b/roles/PowerDNS.pdns/molecule/resources/vars/pdns-repo-44.yml deleted file mode 100644 index 007c357ffad55cc04bcb20f2a9892f130f456490..0000000000000000000000000000000000000000 --- a/roles/PowerDNS.pdns/molecule/resources/vars/pdns-repo-44.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- - -## -# PowerDNS 4.4.x Repository -## - -pdns_install_repo: "{{ pdns_auth_powerdns_repo_44 }}" diff --git a/roles/PowerDNS.pdns/molecule/resources/vars/pdns-repo-45.yml b/roles/PowerDNS.pdns/molecule/resources/vars/pdns-repo-45.yml new file mode 100644 index 0000000000000000000000000000000000000000..ef6aa9e02db32f181821b9d0b008508878715b50 --- /dev/null +++ b/roles/PowerDNS.pdns/molecule/resources/vars/pdns-repo-45.yml @@ -0,0 +1,7 @@ +--- + +## +# PowerDNS 4.5.x Repository +## + +pdns_install_repo: "{{ pdns_auth_powerdns_repo_45 }}" diff --git a/roles/PowerDNS.pdns/molecule/resources/vars/pdns-repo-46.yml b/roles/PowerDNS.pdns/molecule/resources/vars/pdns-repo-46.yml new file mode 100644 index 0000000000000000000000000000000000000000..81b69691e11425a3e45049019a90b66edc9e6a03 --- /dev/null +++ b/roles/PowerDNS.pdns/molecule/resources/vars/pdns-repo-46.yml @@ -0,0 +1,7 @@ +--- + +## +# PowerDNS 4.6.x Repository +## + +pdns_install_repo: "{{ pdns_auth_powerdns_repo_46 }}" diff --git a/roles/PowerDNS.pdns/molecule/resources/vars/pdns-repo-47.yml b/roles/PowerDNS.pdns/molecule/resources/vars/pdns-repo-47.yml new file mode 100644 index 0000000000000000000000000000000000000000..2f96db386eb9eaefec753888f081ebd3d806916a --- /dev/null +++ b/roles/PowerDNS.pdns/molecule/resources/vars/pdns-repo-47.yml @@ -0,0 +1,7 @@ +--- + +## +# PowerDNS 4.7.x Repository +## + +pdns_install_repo: "{{ pdns_auth_powerdns_repo_47 }}" diff --git a/roles/PowerDNS.pdns/molecule/resources/vars/pdns-repo-48.yml b/roles/PowerDNS.pdns/molecule/resources/vars/pdns-repo-48.yml new file mode 100644 index 0000000000000000000000000000000000000000..94715d24af4820de30a381d3e83b108be447a870 --- /dev/null +++ b/roles/PowerDNS.pdns/molecule/resources/vars/pdns-repo-48.yml @@ -0,0 +1,7 @@ +--- + +## +# PowerDNS 4.8.x Repository +## + +pdns_install_repo: "{{ pdns_auth_powerdns_repo_48 }}" diff --git a/roles/PowerDNS.pdns/molecule/systemd-no-overrides/converge.yml b/roles/PowerDNS.pdns/molecule/systemd-no-overrides/converge.yml index 83600f68ada663a908fcc0b8c7d89974b020e7ce..f0cb77e1630a8862eac8f8fc518156e8f4eb60aa 100644 --- a/roles/PowerDNS.pdns/molecule/systemd-no-overrides/converge.yml +++ b/roles/PowerDNS.pdns/molecule/systemd-no-overrides/converge.yml @@ -4,4 +4,4 @@ vars_files: - ../resources/vars/pdns-no-overrides.yml roles: - - { role: pdns-ansible } + - { role: powerdns.pdns } diff --git a/roles/PowerDNS.pdns/molecule/systemd-no-overrides/molecule.yml b/roles/PowerDNS.pdns/molecule/systemd-no-overrides/molecule.yml index 27003dac9d26d15e97551d1d0aab29148ee3e9f5..2ac826d6410f4bb9336d91ba316896b7f85be598 100644 --- a/roles/PowerDNS.pdns/molecule/systemd-no-overrides/molecule.yml +++ b/roles/PowerDNS.pdns/molecule/systemd-no-overrides/molecule.yml @@ -53,4 +53,4 @@ verifier: additional_files_or_dirs: # path relative to 'directory' - ../systemd-no-override - lint: flake8 + diff --git a/roles/PowerDNS.pdns/requirements.yml b/roles/PowerDNS.pdns/requirements.yml index 6a0d2421a50a36ff324a8c9d418bdb713c47e2f8..5eb9382419e2b7879848635b09480f53a9c5bb79 100644 --- a/roles/PowerDNS.pdns/requirements.yml +++ b/roles/PowerDNS.pdns/requirements.yml @@ -1,3 +1,6 @@ --- collections: - name: community.mysql + - name: community.general + - name: community.docker + - name: ansible.posix \ No newline at end of file diff --git a/roles/PowerDNS.pdns/tasks/database-mysql.yml b/roles/PowerDNS.pdns/tasks/database-mysql.yml index 307929d75d9a039359bb5109eaf2fdc13da0a988..087a2de19c25fc4175fa09ffd0b7aa346ec0bec1 100644 --- a/roles/PowerDNS.pdns/tasks/database-mysql.yml +++ b/roles/PowerDNS.pdns/tasks/database-mysql.yml @@ -5,20 +5,16 @@ name: "{{ pdns_mysql_packages }}" state: present -- debug: var=item['value'] - when: "item.key.split(':')[0] == 'gmysql'" - with_dict: "{{ pdns_backends | combine(pdns_mysql_databases_credentials, recursive=True) }}" - - name: Create the PowerDNS MySQL databases mysql_db: login_user: "{{ item['value']['priv_user'] }}" login_password: "{{ item['value']['priv_password'] }}" login_host: "{{ item['value']['host'] }}" login_port: "{{ item['value']['port'] | default('3306') }}" - login_unix_socket: /var/run/mysqld/mysqld.sock name: "{{ item['value']['dbname'] }}" state: present when: "item.key.split(':')[0] == 'gmysql'" + no_log: True with_dict: "{{ pdns_backends | combine(pdns_mysql_databases_credentials, recursive=True) }}" - name: Grant PowerDNS access to the MySQL databases @@ -27,7 +23,6 @@ login_password: "{{ item[0]['priv_password'] }}" login_host: "{{ item[0]['host'] }}" login_port: "{{ item[0]['port'] | default('3306') }}" - login_unix_socket: /var/run/mysqld/mysqld.sock name: "{{ item[0]['user'] }}" password: "{{ item[0]['password'] }}" host: "{{ item[1] }}" @@ -47,12 +42,13 @@ when: item.key.split(':')[0] == 'gmysql' with_dict: "{{ pdns_backends }}" register: _pdns_check_mysql_db + no_log: True changed_when: False - name: Determine location of the SQL file shell: cmd: | - for p in /usr/share/doc/pdns-backend-mysql-{{ _pdns_running_version }}/schema.mysql.sql /usr/share/doc/pdns-backend-mysql/schema.mysql.sql /usr/share/pdns-backend-mysql/schema/schema.mysql.sql /usr/share/dbconfig-common/data/pdns-backend-mysql/install/mysql /usr/share/doc/powerdns/schema.mysql.sql; do + for p in /usr/share/doc/pdns-backend-mysql-{{ _pdns_running_version }}/schema.mysql.sql /usr/share/doc/pdns-backend-mysql/schema.mysql.sql /usr/share/pdns-backend-mysql/schema/schema.mysql.sql /usr/share/dbconfig-common/data/pdns-backend-mysql/install/mysql /usr/share/doc/powerdns/schema.mysql.sql /usr/share/doc/pdns/schema.mysql.sql; do if [ -f $p ]; then echo $p exit 0 @@ -77,5 +73,6 @@ name: "{{ item.item['value']['dbname'] }}" state: import target: "{{ pdns_mysql_schema_file_to_use }}" + no_log: True when: "item['item']['key'].split(':')[0] == 'gmysql' and item['stdout'] == '0'" with_items: "{{ _pdns_check_mysql_db['results'] }}" diff --git a/roles/PowerDNS.pdns/tasks/install.yml b/roles/PowerDNS.pdns/tasks/install.yml index af547fdca4f5ae35dc5b120794f9e2c67d94ed5e..2e2e455ca9383b98891c08fc48b043116733b302 100644 --- a/roles/PowerDNS.pdns/tasks/install.yml +++ b/roles/PowerDNS.pdns/tasks/install.yml @@ -29,5 +29,6 @@ package: name: "{{ pdns_backends_packages[item.key.split(':')[0]] }}{{ _pdns_package_version | default('') }}" state: present + no_log: True when: pdns_backends_packages[item.key.split(':')[0]] is defined with_dict: "{{ pdns_backends }}" diff --git a/roles/PowerDNS.pdns/tasks/main.yml b/roles/PowerDNS.pdns/tasks/main.yml index c512126a7b9c7aa61f17e28a88a91831b717d82a..8c230f630ba452a471ae34d73c1cc5fd15c123d9 100644 --- a/roles/PowerDNS.pdns/tasks/main.yml +++ b/roles/PowerDNS.pdns/tasks/main.yml @@ -10,52 +10,53 @@ tags: - always -- include: "repo-{{ ansible_os_family }}.yml" +- include_tasks: "repo-{{ ansible_os_family }}.yml" when: "pdns_install_repo | length > 0" tags: - install - repository -- include: install.yml +- include_tasks: install.yml tags: - install -- include: inspect.yml +- include_tasks: inspect.yml tags: - db - mysql - sqlite - config -- include: database-mysql.yml +- include_tasks: database-mysql.yml when: "pdns_mysql_databases_credentials | length > 0" tags: - db - mysql -- include: database-sqlite3.yml +- include_tasks: database-sqlite3.yml when: "pdns_sqlite_databases_locations | length > 0" tags: - db - sqlite -- include: database-lmdb.yml +- include_tasks: database-lmdb.yml when: "pdns_lmdb_databases_locations | length > 0" tags: - db - lmdb -- include: configure.yml +- include_tasks: configure.yml tags: - config -- include: selinux.yml +- include_tasks: selinux.yml when: ansible_selinux is defined and ansible_selinux.status == 'enabled' tags: - selinux - config - name: Start and enable the PowerDNS service + throttle: 1 service: name: "{{ pdns_service_name }}" state: "{{ pdns_service_state }}" diff --git a/roles/PowerDNS.pdns/tasks/repo-RedHat.yml b/roles/PowerDNS.pdns/tasks/repo-RedHat.yml index 09eaf5f65f867bbd717bb00a120c2f4c0993d981..779dd1186b7b6acc874d648147f733ad5afdabcd 100644 --- a/roles/PowerDNS.pdns/tasks/repo-RedHat.yml +++ b/roles/PowerDNS.pdns/tasks/repo-RedHat.yml @@ -8,11 +8,19 @@ state: present when: ansible_distribution in [ 'CentOS' ] - - name: Install epel-release on RHEL/OracleLinux - yum: + - name: Install epel-release on RHEL + package: name: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm" state: present - when: ansible_distribution in [ 'RedHat', 'OracleLinux' ] + when: ansible_distribution in [ 'RedHat' ] + + - name: Install epel-release and hostname on OracleLinux + package: + name: + - "oracle-epel-release-el{{ ansible_distribution_major_version }}" + - hostname + state: present + when: ansible_distribution in [ 'OracleLinux' ] when: pdns_install_epel diff --git a/roles/PowerDNS.pdns/test-requirements.txt b/roles/PowerDNS.pdns/test-requirements.txt index be8d0d151f62caddea0e517b201c5831666cf14d..542765fc2260d31aafbce63d082bd5a2220596db 100644 --- a/roles/PowerDNS.pdns/test-requirements.txt +++ b/roles/PowerDNS.pdns/test-requirements.txt @@ -1,7 +1,7 @@ -jinja2==2.11.3 -ansible-lint==5.0.7 -yamllint==1.26.1 -molecule[docker]==3.3.0 -molecule[lint]==3.3.0 -testinfra -docker==5.0.0 +ansible-lint==6.17.2 +yamllint==1.32.0 +molecule-plugins[docker]==23.4.1 +molecule-plugins[lint]==23.4.1 +molecule==5.1.0 +pytest-testinfra==8.1.0 +docker==6.1.3 diff --git a/roles/PowerDNS.pdns/tox.ini b/roles/PowerDNS.pdns/tox.ini index 6608f943eed8faf02aca9803eb1690bfc7eef873..41095ceb9da1e7d0a462af582cd840e440cfb971 100644 --- a/roles/PowerDNS.pdns/tox.ini +++ b/roles/PowerDNS.pdns/tox.ini @@ -1,22 +1,22 @@ [tox] minversion = 1.8 -envlist = ansible{29,210,211} +envlist = ansible{212,213,214} skipsdist = true [gh-actions:env] ANSIBLE= - 2.9: ansible29 - 2.10: ansible210 - 2.11: ansible211 + 2.12: ansible212 + 2.13: ansible213 + 2.14: ansible214 [testenv] passenv = * deps = -rtest-requirements.txt - ansible29: ansible<2.10 - ansible210: ansible<2.11 - ansible211: ansible<2.12 + ansible212: ansible-core>2.12,<2.13 + ansible213: ansible-core>2.13,<2.14 + ansible214: ansible-core>2.14,<2.15 setenv = PY_COLORS = 1 commands = - {posargs:molecule -vv test --all --destroy always} + {posargs:molecule test --all --destroy always} \ No newline at end of file diff --git a/roles/PowerDNS.pdns/vars/RedHat-9.yml b/roles/PowerDNS.pdns/vars/RedHat-9.yml new file mode 100644 index 0000000000000000000000000000000000000000..eeac155bfa58fa0f3d89b0697bb685c4aab4f17f --- /dev/null +++ b/roles/PowerDNS.pdns/vars/RedHat-9.yml @@ -0,0 +1,33 @@ +--- + +# The name of the PowerDNS Authoritative Server package +default_pdns_package_name: "pdns" + +# Packages needed to install MySQL +pdns_mysql_packages: + - mariadb + - mariadb-server + - mariadb-connector-c + - python3-PyMySQL + - perl-DBD-MySQL + +# The name of the PowerDNS Authoritative Server debug package +default_pdns_debug_symbols_package_name: "pdns-debuginfo" + +# List of PowerDNS Authoritative Server backends packages on RedHat +default_pdns_backends_packages: + geo: pdns-backend-geo + geoip: pdns-backend-geoip + gmysql: pdns-backend-mysql + gpgsql: pdns-backend-postgresql + gsqlite3: pdns-backend-sqlite + ldap: pdns-backend-ldap + lmdb: pdns-backend-lmdb + lua: pdns-backend-lua + mydns: pdns-backend-mydns + pipe: pdns-backend-pipe + remote: pdns-backend-remote + tinydns: pdns-backend-tinydns + +# The directory where the PowerDNS Authoritative Server configuration is located +default_pdns_config_dir: "/etc/pdns" diff --git a/roles/PowerDNS.pdns/vars/main.yml b/roles/PowerDNS.pdns/vars/main.yml index 10ac8a0c77badbf472d63e45a4964336ddeb59d3..c8c2d6ab647d070d169e8a31453b2d978f0628c9 100644 --- a/roles/PowerDNS.pdns/vars/main.yml +++ b/roles/PowerDNS.pdns/vars/main.yml @@ -9,23 +9,42 @@ pdns_auth_powerdns_repo_master: yum_debug_symbols_repo_baseurl: "http://repo.powerdns.com/centos/$basearch/$releasever/auth-master/debug" name: "powerdns-auth-master" -pdns_auth_powerdns_repo_43: +pdns_auth_powerdns_repo_45: apt_repo_origin: "repo.powerdns.com" - apt_repo: "deb [arch=amd64] http://repo.powerdns.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release | lower }}-auth-43 main" + apt_repo: "deb [arch=amd64] http://repo.powerdns.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release | lower }}-auth-45 main" gpg_key: "http://repo.powerdns.com/FD380FBB-pub.asc" gpg_key_id: "9FAAA5577E8FCF62093D036C1B0C6205FD380FBB" - yum_repo_baseurl: "http://repo.powerdns.com/centos/$basearch/$releasever/auth-43" - yum_debug_symbols_repo_baseurl: "http://repo.powerdns.com/centos/$basearch/$releasever/auth-43/debug" - name: "powerdns-auth-43" + yum_repo_baseurl: "http://repo.powerdns.com/centos/$basearch/$releasever/auth-45" + yum_debug_symbols_repo_baseurl: "http://repo.powerdns.com/centos/$basearch/$releasever/auth-45/debug" + name: "powerdns-auth-45" + +pdns_auth_powerdns_repo_46: + apt_repo_origin: "repo.powerdns.com" + apt_repo: "deb [arch=amd64] http://repo.powerdns.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release | lower }}-auth-46 main" + gpg_key: "http://repo.powerdns.com/FD380FBB-pub.asc" + gpg_key_id: "9FAAA5577E8FCF62093D036C1B0C6205FD380FBB" + yum_repo_baseurl: "http://repo.powerdns.com/centos/$basearch/$releasever/auth-46" + yum_debug_symbols_repo_baseurl: "http://repo.powerdns.com/centos/$basearch/$releasever/auth-46/debug" + name: "powerdns-auth-46" + +pdns_auth_powerdns_repo_47: + apt_repo_origin: "repo.powerdns.com" + apt_repo: "deb [arch=amd64] http://repo.powerdns.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release | lower }}-auth-47 main" + gpg_key: "http://repo.powerdns.com/FD380FBB-pub.asc" + gpg_key_id: "9FAAA5577E8FCF62093D036C1B0C6205FD380FBB" + yum_repo_baseurl: "http://repo.powerdns.com/centos/$basearch/$releasever/auth-47" + yum_debug_symbols_repo_baseurl: "http://repo.powerdns.com/centos/$basearch/$releasever/auth-47/debug" + name: "powerdns-auth-47" -pdns_auth_powerdns_repo_44: +pdns_auth_powerdns_repo_48: apt_repo_origin: "repo.powerdns.com" - apt_repo: "deb [arch=amd64] http://repo.powerdns.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release | lower }}-auth-44 main" + apt_repo: "deb [arch=amd64] http://repo.powerdns.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release | lower }}-auth-48 main" gpg_key: "http://repo.powerdns.com/FD380FBB-pub.asc" gpg_key_id: "9FAAA5577E8FCF62093D036C1B0C6205FD380FBB" - yum_repo_baseurl: "http://repo.powerdns.com/centos/$basearch/$releasever/auth-44" - yum_debug_symbols_repo_baseurl: "http://repo.powerdns.com/centos/$basearch/$releasever/auth-44/debug" - name: "powerdns-auth-44" + yum_repo_baseurl: "http://repo.powerdns.com/centos/$basearch/$releasever/auth-48" + yum_debug_symbols_repo_baseurl: "http://repo.powerdns.com/centos/$basearch/$releasever/auth-48/debug" + name: "powerdns-auth-48" + default_pdns_service_overrides: >- {{ { 'User' : pdns_user diff --git a/roles/PowerDNS.setup/tasks/main.yml b/roles/PowerDNS.setup/tasks/main.yml index b58990e049b74df51e754bc74d4eae3ce065f58d..08489979f6a8c6040916d6d179c25654df281957 100644 --- a/roles/PowerDNS.setup/tasks/main.yml +++ b/roles/PowerDNS.setup/tasks/main.yml @@ -2,13 +2,13 @@ # tasks file for PowerDNS.setup ### get_distribution -- include: ../roles/common/tasks/loadVariables.yml +- include_tasks: ../roles/common/tasks/loadVariables.yml ### Packages -- include: ../roles/common/tasks/updatePkg.yml +- include_tasks: ../roles/common/tasks/updatePkg.yml tags: configpkg -- include: ../roles/common/tasks/upgradePkg.yml +- include_tasks: ../roles/common/tasks/upgradePkg.yml tags: upgradepkg