No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
group_vars
inventories
roles
spec
vars
.ansiblespec
.gitignore
Gemfile
README.md
Rakefile
Vagrantfile
site.yml

README.md

powerdns-ansible

requirements

  • Vagrant 1.5+
  • Ansible

setup

Add below lines to $HOME/.ssh/config of local machine.

Host 10.200.19.*
    User vagrant
    IdentityFile ~/.vagrant.d/insecure_private_key
    UserKnownHostsFile /dev/null
    StrictHostKeyChecking no

Clone this repository.

$ git clone https://github.com/akagisho/powerdns-ansible.git
$ cd powerdns-ansible

Start VMs.

$ vagrant up

Check VMs' connection.

$ ansible -i inventories/development all -m ping
10.200.19.10 | success >> {
    "changed": false,
    "ping": "pong"
}

10.200.19.11 | success >> {
    "changed": false,
    "ping": "pong"
}

10.200.19.12 | success >> {
    "changed": false,
    "ping": "pong"
}

10.200.19.13 | success >> {
    "changed": false,
    "ping": "pong"
}

execute

Execute ansible playbook.

$ vagrant provision
    OR
$ ansible-playbook -i inventories/development site.yml

Check installation.

$ for i in 10.200.19.10 10.200.19.11 10.200.19.12 10.200.19.13; do dig @$i example.com. soa +short; done
ns1.example.com. admin.example.com. 2014052907 10800 7200 604800 10800
ns1.example.com. admin.example.com. 2014052907 10800 7200 604800 10800
ns1.example.com. admin.example.com. 2014052907 10800 7200 604800 10800
ns1.example.com. admin.example.com. 2014052907 10800 7200 604800 10800

test

You can test server's configurations by using Serverspec.

$ bundle install --path vendor/bundle
$ rm -f hosts && ln -s inventories/<environment> hosts
$ bundle exec rake serverspec:master
$ bundle exec rake serverspec:slave-bind
$ bundle exec rake serverspec:slave-knotdns
$ bundle exec rake serverspec:slave-nsd

use

Access PowerDNS on Rails interface with admin@example.com/secret.

references