- Vagrant 1.5+
- Ansible
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/ansible-powerdns.git
$ cd ansible-powerdns
Start VMs.
$ vagrant up
Check VMs' connection.
$ ansible -i develop/inventory 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"
}
Execute ansible playbook.
$ vagrant provision
OR
$ ansible-playbook -i develop/inventory site.yml
Check installation.
$ for i in 10.200.19.10 10.200.19.11 10.200.19.12; 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
You can test server's configurations by using Serverspec.
$ bundle install --path vendor/bundle
$ rm -f hosts && ln -s <environment>/inventory hosts
$ bundle exec rake serverspec:master
$ bundle exec rake serverspec:slave
Access PowerDNS on Rails interface with [email protected]/secret.
- PowerDNS + BIND で DNS を構築する - あかぎメモ