forked from infra/ansible
dns_*: initialize sqlite database
This commit is contained in:
parent
1b0db12005
commit
865c58bd4c
@ -5,11 +5,21 @@
|
|||||||
name:
|
name:
|
||||||
- pdns-server
|
- pdns-server
|
||||||
- pdns-backend-sqlite3
|
- pdns-backend-sqlite3
|
||||||
|
- sqlite3
|
||||||
|
|
||||||
- name: Configure powerdns
|
- name: Configure powerdns
|
||||||
template: src=pdns.conf.j2 dest=/etc/powerdns/pdns.conf
|
template: src=pdns.conf.j2 dest=/etc/powerdns/pdns.conf
|
||||||
notify: Restart powerdns
|
notify: Restart powerdns
|
||||||
|
|
||||||
|
- name: Initialize database
|
||||||
|
command:
|
||||||
|
cmd: >
|
||||||
|
sqlite3 -init /usr/share/doc/pdns-backend-sqlite3/schema.sqlite3.sql
|
||||||
|
/var/lib/powerdns/powerdns.sqlite3
|
||||||
|
creates: /var/lib/powerdns/powerdns.sqlite3
|
||||||
|
become: true
|
||||||
|
become_user: pdns
|
||||||
|
|
||||||
- name: Copy update policy script
|
- name: Copy update policy script
|
||||||
copy: src=updatepolicy.lua dest=/etc/powerdns/updatepolicy.lua
|
copy: src=updatepolicy.lua dest=/etc/powerdns/updatepolicy.lua
|
||||||
notify: Restart powerdns
|
notify: Restart powerdns
|
||||||
|
@ -4,8 +4,10 @@
|
|||||||
apt:
|
apt:
|
||||||
name:
|
name:
|
||||||
- dnsdist
|
- dnsdist
|
||||||
|
- pdns-backend-sqlite3
|
||||||
- pdns-server
|
- pdns-server
|
||||||
- pdns-recursor
|
- pdns-recursor
|
||||||
|
- sqlite3
|
||||||
|
|
||||||
- name: Create zone directory
|
- name: Create zone directory
|
||||||
file: path=/etc/powerdns/bind/ state=directory
|
file: path=/etc/powerdns/bind/ state=directory
|
||||||
@ -20,6 +22,15 @@
|
|||||||
- bind/23.172.in-addr.arpa.zone
|
- bind/23.172.in-addr.arpa.zone
|
||||||
- bind/binary.kitchen.zone
|
- bind/binary.kitchen.zone
|
||||||
|
|
||||||
|
- name: Initialize database
|
||||||
|
command:
|
||||||
|
cmd: >
|
||||||
|
sqlite3 -init /usr/share/doc/pdns-backend-sqlite3/schema.sqlite3.sql
|
||||||
|
/var/lib/powerdns/pdns.sqlite3
|
||||||
|
creates: /var/lib/powerdns/pdns.sqlite3
|
||||||
|
become: true
|
||||||
|
become_user: pdns
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
# Initialize zone users.binary.kitchen using pdnsutil or SQL on the master
|
# Initialize zone users.binary.kitchen using pdnsutil or SQL on the master
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user