Skip to content
Snippets Groups Projects
Commit 4231743c authored by Paul's avatar Paul :turtle:
Browse files

split dns nameserver into different role

parent aa3fca1c
No related branches found
No related tags found
1 merge request!36WIP: ansible for srv02
Showing
with 29 additions and 33 deletions
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
become: yes become: yes
roles: roles:
- base - base
- ffhl_nameserver
- hosts: kaisertor - hosts: kaisertor
become: yes become: yes
......
-- Debian default Lua configuration file for PowerDNS Recursor
-- Load DNSSEC root keys from dns-root-data package.
-- Note: If you provide your own Lua configuration file, consider
-- running rootkeys.lua too.
dofile("/usr/share/pdns-recursor/lua-config/rootkeys.lua")
--- ---
- name: copy base configs - name: copy base configs
tags: [base, etc, apt, powerdns] tags: [base, etc, apt]
copy: copy:
src: etc/ src: etc/
dest: /etc dest: /etc
- name: copy scripts - name: copy scripts
tags: [base, powerdns] tags: [base]
copy: copy:
src: scripts/ src: scripts/
dest: /usr/local/lib/ffhl/ dest: /usr/local/lib/ffhl/
...@@ -101,8 +101,6 @@ ...@@ -101,8 +101,6 @@
tags: [network, radvd] tags: [network, radvd]
- include: dhcpd.yml - include: dhcpd.yml
tags: [network, dhcp] tags: [network, dhcp]
- include: powerdns.yml
tags: [powerdns, network]
- include: bird.yml - include: bird.yml
tags: [bird] tags: [bird]
......
...@@ -9,6 +9,6 @@ mkdir -p "$DEST" ...@@ -9,6 +9,6 @@ mkdir -p "$DEST"
git clone "$REPO" "$DIR" git clone "$REPO" "$DIR"
git --git-dir="$DIR/.git" --work-tree="$DEST" reset --hard git --git-dir="$DIR/.git" --work-tree="$DEST" reset --hard
rm -rf $DIR rm -rf "$DIR"
pdns_control reload pdns_control reload
---
- name: install packages
tags: [dns, powerdns]
apt:
state: latest
name:
- dnsdist
- pdns-recursor
- pdns-server
- pdns-backend-bind
- include: powerdns.yml
tags: [powerdns]
--- ---
- name: install packages
apt:
autoremove: yes
update_cache: yes
state: latest
name:
- dnsdist
- pdns-recursor
- pdns-server
- pdns-backend-bind
- name: copy powerdns configs - name: copy systemd services and timers
copy: copy:
src: powerdns src: systemd/
dest: /etc/ dest: /etc/systemd/system/
- name: copy dnsdist configs - name: copy dnsdist configs
copy: copy:
src: dnsdist src: dnsdist
dest: /etc/ dest: /etc/
- name: clone dns-repo
git:
repo: "{{ dns_repo_url }}"
dest: /var/local/ffhl-dns
accept_hostkey: yes
version: HEAD
- name: remove default bind-backend config - name: remove default bind-backend config
file: file:
path: /etc/powerdns/pdns.d/bind.conf path: /etc/powerdns/pdns.d/bind.conf
state: absent state: absent
- name: remove old dns repo
file:
path: /var/local/ffhl-dns
state: absent
- name: restart powerdns - name: restart powerdns
systemd: systemd:
daemon_reload: yes daemon_reload: yes
...@@ -42,6 +31,6 @@ ...@@ -42,6 +31,6 @@
with_items: with_items:
- pdns-recursor.service - pdns-recursor.service
- pdns.service - pdns.service
- update-ffhl-dns.timer
- dnsdist.service - dnsdist.service
- update-ffhl-dns.timer
- update-ffhl-dns.service - update-ffhl-dns.service
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment