tweak do-update
[ansible.git] / roles / bind / tasks / main.yml
1 - name: install bind
2   apt: name=bind9,hash-slinger state=latest
3 - name: install zonemaker
4   git:
5     dest: /var/lib/bind/zonemaker
6     repo: 'https://git.ralfj.de/zonemaker.git'
7     version: master
8 - name: install Makefile
9   copy:
10     dest: /var/lib/bind/Makefile
11     src: files/Makefile
12 - name: install bind config
13   template:
14     dest: /etc/bind/named.conf.options
15     src: templates/named.conf.options
16   notify: bind9
17 # dyn-nsupdate
18 - name: install dyn-nsupdate build-deps
19   apt: name=libboost-regex-dev,libboost-program-options-dev,cmake state=latest
20 - name: clone dyn-nsupdate
21   git:
22     dest: /var/lib/bind/dyn-nsupdate.d
23     repo: 'https://git.ralfj.de/dyn-nsupdate.git'
24     version: master
25   register: dyn_nsupdate_src
26 - name: create build dir
27   file: path=/var/lib/bind/dyn-nsupdate.d/nsupd-wrapper/build state=directory owner=bind
28 - name: compile dyn-nsupdate
29   when: dyn_nsupdate_src.changed
30   become_user: bind
31   shell: "cmake .. -DCMAKE_BUILD_TYPE=Release -DDYNNSUPDATE_CONFIG_FILE=/var/lib/bind/dyn-nsupdate.conf && make"
32   args:
33     chdir: /var/lib/bind/dyn-nsupdate.d/nsupd-wrapper/build
34 - name: install dyn-nsupdate
35   when: dyn_nsupdate_src.changed
36   command: install /var/lib/bind/dyn-nsupdate.d/nsupd-wrapper/build/dyn-nsupdate /var/lib/bind/dyn-nsupdate -o bind -g bind -m +rx,u+ws