setup opera dns ui on debian based hosts via ansible
tested with ansible core >= 2.13.2
- hosts: pdns
vars:
postgresql_users:
- name: dnsui-user
password: !vault |
$ANSIBLE_VAULT....
postgresql_databases:
- name: dnsui
owner: "{{ postgresql_users.0.name }}"
opera_dnsui_ini_db_dsn: "pgsql:host=localhost dbname={{ postgresql_databases.0.name }}"
opera_dnsui_ini_db_username: "{{ postgresql_users.0.name }}"
opera_dnsui_ini_db_password: "{{ postgresql_users.0.password }}"
...
roles:
- role: geerlingguy.postgresql #https://github.com/geerlingguy/ansible-role-postgresql
tags:
- pdns
- postgresql
- role: pdns-ansible #https://github.com/PowerDNS/pdns-ansible
tags: pdns
- role: opera-dns-ui
tags:
- pdns
- opera-dns-ui
If you like to use a diferent install source, i.e. a fork, just set something like
opera_dnsui_github_url: https://github.com/Rosa-Luxemburgstiftung-Berlin/dns-ui
opera_dnsui_repo_version: v0.2.7-203
set vars:
# opera_dnsui_ldapurl: # unset this!
opera_dnsui_ini_ldap_enabled: 0
opera_dnsui_ini_php_auth_enabled: 1
create http auth user:
htpasswd -c /srv/opera-dnsui.httpauth test
and create php auth user:
root@ns:/srv/opera-dnsui# php scripts/create_admin_account.php
This script creates a new admin account in DNS UI.
If you are using a central authentication directory (eg. LDAP) then
you probably don't need to use this.
User ID of new admin account:
test
Full name of user:
testosteron
Email address of user:
[email protected]
Administrative user test created.