Skip to content

Commit

Permalink
Implementing @pieterlexis review
Browse files Browse the repository at this point in the history
  • Loading branch information
atosatto committed Nov 14, 2016
1 parent 70df71f commit 806f75a
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 14 deletions.
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,27 @@ Available variables are listed below, along with default values (see `defaults/m

dnsdist_install_repo: False

By default the PowerDNS Recursor is installed from the os default repositories.
You can install the PowerDNS Recursor package from official PowerDNS repository
overriding the `dnsdist_install_repo` variable value as follows:
By default dnsdist is installed from the os default repositories.
You can install dnsdist from the official PowerDNS repository overriding
the `dnsdist_install_repo` variable value as follows:

# Install dnsdist from the master branch
- hosts: pdns-dnsdists
roles:
- { role: PowerDNS.dnsdist,
dnsdist_install_repo: "{{ dnsdist_official_dnsdist_master }}"
dnsdist_install_repo: "{{ dnsdist_powerdns_repo_master }}"

# Install dnsdist 1.0.x
- hosts: pdns-dnsdists
roles:
- { role: PowerDNS.dnsdist,
dnsdist_install_repo: "{{ dnsdist_official_dnsdist_10 }}"
dnsdist_install_repo: "{{ dnsdist_powerdns_repo_10 }}"

# Install dnsdist 1.1.x
- hosts: pdns-dnsdists
roles:
- { role: PowerDNS.dnsdist,
dnsdist_install_repo: "{{ dnsdist_official_dnsdist_11 }}"
dnsdist_install_repo: "{{ dnsdist_powerdns_repo_11 }}"

The roles also supports custom repositories

Expand All @@ -58,6 +58,14 @@ The roles also supports custom repositories

If targeting only a specific platform (e.g. Debian) it's not needed to provide other platform (e.g. yum) repositories informations.

dnsdist_install_epel: True

By default the role installs also the EPEL repository.
EPEL is needed to satisfy some dnsdist dependencies like `lidsodium`.
If these dependencies are included into other repositories already configured in the
or in a custom `dnsdist_install_repo` override this variable to `False` to skip
EPEL installation.

dnsdist_acls: []

A list of dnsdist ACLS (netmasks) to add to the configuration.
Expand Down
4 changes: 4 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
# By default no additional repository is added to the hosts to install dnsdist
dnsdist_install_repo: False
#
# Install the EPEL repository.
# EPEL is needed to satisfy some dnsdist dependencies like lidsodium
dnsdist_install_epel: True
#
# To install the latest build from the master branch of dnsdist from the
# PowerDNS official repository use the following playbook
# - hosts: all
Expand Down
4 changes: 0 additions & 4 deletions handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
---

- name: check config and restart dnsdist
command: dnsdist --check-config -C /etc/dnsdist/dnsdist.conf
notify: restart dnsdist

- name: restart dnsdist
service:
name: dnsdist
Expand Down
2 changes: 1 addition & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- repository

- include: install-epel.yml
when: ansible_os_family == 'RedHat'
when: ansible_os_family == 'RedHat' and dnsdist_install_epel
tags:
- install

Expand Down
6 changes: 3 additions & 3 deletions vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
---

dnsdist_official_dnsdist_master:
dnsdist_powerdns_repo_master:
apt_repo_origin: "repo.powerdns.com"
apt_repo: "deb [arch=amd64] http://repo.powerdns.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release | lower }}-dnsdist-master main"
gpg_key: "http://repo.powerdns.com/CBC8B383-pub.asc"
gpg_key_id: "D47975F8DAE32700A563E64FFF389421CBC8B383"
yum_repo_baseurl: "http://repo.powerdns.com/centos/$basearch/$releasever/dnsdist-master"
yum_repo_name: "powerdns-dnsdist"

dnsdist_official_dnsdist_10:
dnsdist_powerdns_repo_10:
apt_repo_origin: "repo.powerdns.com"
apt_repo: "deb [arch=amd64] http://repo.powerdns.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release | lower }}-dnsdist-10 main"
gpg_key: "http://repo.powerdns.com/FD380FBB-pub.asc"
gpg_key_id: "9FAAA5577E8FCF62093D036C1B0C6205FD380FBB"
yum_repo_baseurl: "http://repo.powerdns.com/centos/$basearch/$releasever/dnsdist-10"
yum_repo_name: "powerdns-dnsdist"

dnsdist_official_dnsdist_11:
dnsdist_powerdns_repo_11:
apt_repo_origin: "repo.powerdns.com"
apt_repo: "deb [arch=amd64] http://repo.powerdns.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release | lower }}-dnsdist-11 main"
gpg_key: "http://repo.powerdns.com/FD380FBB-pub.asc"
Expand Down

0 comments on commit 806f75a

Please sign in to comment.