Fixes to the powerdns-admin role. #234

Merged
adellam merged 1 commits from adellam/ansible-roles:master into master 2021-06-21 14:38:57 +02:00
3 changed files with 17 additions and 6 deletions

View File

@ -1,6 +1,9 @@
---
pdns_admin_install: True
# Use 'HEAD' to fetch the latest code
pdns_admin_version: 'v0.2.3'
# Set it manually from the command line when you want to upgrade
# -e "pdns_admin_upgrade=True"
pdns_admin_upgrade: False
pdns_admin_dir: 'pdns_admin-{{ pdns_admin_version }}.linux-amd64'
pdns_admin_git_repo_url: 'https://github.com/ngoduykhanh/PowerDNS-Admin.git'

View File

@ -1,5 +1,12 @@
---
dependencies:
- { role: '../../library/roles/postgresql', when: pdns_admin_local_pgsql | bool }
- role: '../../library/roles/nginx'
- src: git+https://gitea-s2i2s.isti.cnr.it/ISTI-ansible-roles/ansible-role-postgresql.git
version: master
name: postgresql
state: latest
when: pdns_admin_local_pgsql
- src: git+https://gitea-s2i2s.isti.cnr.it/ISTI-ansible-roles/ansible-role-nginx.git
version: master
name: nginx
state: latest
- role: '../../library/roles/node_js'

View File

@ -17,18 +17,19 @@
apt: pkg={{ pdns_admin_prereqs }} state=present update_cache=yes cache_valid_time=1800
- name: Clone pdns_admin
git: repo={{ pdns_admin_git_repo_url }} dest={{ pdns_admin_home }} update=no
git: repo={{ pdns_admin_git_repo_url }} version={{ pdns_admin_version }} dest={{ pdns_admin_home }} update=no
when: not pdns_admin_upgrade
- name: Force the clone and upgrade pdns_admin when updating
git: repo={{ pdns_admin_git_repo_url }} dest={{ pdns_admin_home }} update=yes force=yes
when: pdns_admin_upgrade | bool
git: repo={{ pdns_admin_git_repo_url }} version={{ pdns_admin_version }} dest={{ pdns_admin_home }} update=yes force=yes
when: pdns_admin_upgrade
- name: Remove the files that we use to skip the initialisation commands
file: dest={{ item }} state=absent
with_items:
- '{{ pdns_admin_logdir }}/.db_initialised'
- '{{ pdns_admin_home }}/app/static/generated/login.js'
when: pdns_admin_upgrade | bool
when: pdns_admin_upgrade
- name: Make the upload directory writeable by the pdnsadmin user
file: dest={{ pdns_admin_home }}/upload recurse=yes owner={{ pdns_admin_user }} group={{ pdns_admin_user }}