forked from ISTI-ansible-roles/ansible-roles
Merge branch 'master' of adellam/ansible-roles into master
This commit is contained in:
commit
fa9beeb65d
|
@ -16,6 +16,8 @@ pdns_admin_prereqs:
|
||||||
- python3
|
- python3
|
||||||
- python3-pip
|
- python3-pip
|
||||||
- python3-virtualenv
|
- python3-virtualenv
|
||||||
|
- virtualenv
|
||||||
|
- python3-psycopg2
|
||||||
- python3-dev
|
- python3-dev
|
||||||
- libmysqlclient-dev
|
- libmysqlclient-dev
|
||||||
- libxmlsec1-dev
|
- libxmlsec1-dev
|
||||||
|
@ -24,4 +26,3 @@ pdns_admin_prereqs:
|
||||||
- libsasl2-dev
|
- libsasl2-dev
|
||||||
- libldap2-dev
|
- libldap2-dev
|
||||||
- libssl-dev
|
- libssl-dev
|
||||||
- python3-psycopg2
|
|
|
@ -1,3 +1,4 @@
|
||||||
---
|
---
|
||||||
dependencies:
|
dependencies:
|
||||||
- role: '../../library/roles/nginx'
|
- role: '../../library/roles/nginx'
|
||||||
|
- role: '../../library/roles/node_js'
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
- '{{ pdns_admin_logdir }}'
|
- '{{ pdns_admin_logdir }}'
|
||||||
|
|
||||||
- name: Install the pdns_admin prerequisite deb packages
|
- name: Install the pdns_admin prerequisite deb packages
|
||||||
apt: pkg={{ item }} state=present update_cache=yes cache_valid_time=1800
|
apt: pkg={{ pdns_admin_prereqs }} state=present update_cache=yes cache_valid_time=1800
|
||||||
with_items: '{{ pdns_admin_prereqs }}'
|
|
||||||
|
|
||||||
- name: Clone pdns_admin
|
- name: Clone pdns_admin
|
||||||
git: repo={{ pdns_admin_git_repo_url }} dest={{ pdns_admin_home }}
|
git: repo={{ pdns_admin_git_repo_url }} dest={{ pdns_admin_home }}
|
||||||
|
@ -24,7 +23,7 @@
|
||||||
file: dest={{ pdns_admin_home }}/upload recurse=yes owner={{ pdns_admin_user }} group={{ pdns_admin_user }}
|
file: dest={{ pdns_admin_home }}/upload recurse=yes owner={{ pdns_admin_user }} group={{ pdns_admin_user }}
|
||||||
|
|
||||||
- name: Install the pdns_admin configuration
|
- name: Install the pdns_admin configuration
|
||||||
template: src=config.py dest={{ pdns_admin_home }}/config.py
|
template: src=config.py dest={{ pdns_admin_home }}/config.py owner=root group={{ pdns_admin_user }} mode=0640
|
||||||
notify: Restart pdns_admin
|
notify: Restart pdns_admin
|
||||||
|
|
||||||
- name: Create a python3 virtualenv
|
- name: Create a python3 virtualenv
|
||||||
|
@ -42,10 +41,21 @@
|
||||||
notify: Restart pdns_admin
|
notify: Restart pdns_admin
|
||||||
|
|
||||||
- name: Initialise the database
|
- name: Initialise the database
|
||||||
shell: cd {{ pdns_admin_home }}; . {{ pdns_admin_home }}/flask/bin/activate ; ./create_db.py ; touch {{ pdns_admin_logdir }}/.db_initialised
|
shell: cd {{ pdns_admin_home }}; . {{ pdns_admin_home }}/flask/bin/activate ; export FLASK_APP=app/__init__.py ; flask db upgrade && touch {{ pdns_admin_logdir }}/.db_initialised
|
||||||
args:
|
args:
|
||||||
creates: '{{ pdns_admin_logdir }}/.db_initialised'
|
creates: '{{ pdns_admin_logdir }}/.db_initialised'
|
||||||
|
|
||||||
|
- name: Create the assets files
|
||||||
|
shell: cd {{ pdns_admin_home }}; . {{ pdns_admin_home }}/flask/bin/activate ; yarn install --pure-lockfile ; flask assets build
|
||||||
|
args:
|
||||||
|
creates: '{{ pdns_admin_home }}/app/static/generated/login.js'
|
||||||
|
|
||||||
|
- name: Some directories must be writeable by the pdnsadmin user
|
||||||
|
file: dest={{ item }} recurse=yes owner={{ pdns_admin_user }} group={{ pdns_admin_user }}
|
||||||
|
with_items:
|
||||||
|
- '{{ pdns_admin_home }}/app/static/custom'
|
||||||
|
- '{{ pdns_admin_home }}/app/static/.webassets-cache'
|
||||||
|
|
||||||
- name: Install the pdns_admin server systemd unit
|
- name: Install the pdns_admin server systemd unit
|
||||||
template: src=powerdns-admin.service dest=/etc/systemd/system/powerdns-admin.service mode=0644 owner=root group=root
|
template: src=powerdns-admin.service dest=/etc/systemd/system/powerdns-admin.service mode=0644 owner=root group=root
|
||||||
when: ansible_service_mgr == 'systemd'
|
when: ansible_service_mgr == 'systemd'
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
---
|
---
|
||||||
http_port: 80
|
http_port: 80
|
||||||
https_port: 443
|
https_port: 443
|
||||||
|
|
||||||
|
node_js_repo_version: 10
|
||||||
|
node_js_yarn_install: True
|
||||||
|
|
||||||
nginx_letsencrypt_managed: True
|
nginx_letsencrypt_managed: True
|
||||||
nginx_use_common_virthost: True
|
nginx_use_common_virthost: True
|
||||||
nginx_virthosts:
|
nginx_virthosts:
|
||||||
|
|
Loading…
Reference in New Issue