forked from evolix/ansible-roles
Migrated bind role to python booleans
This commit is contained in:
parent
c6804e73e7
commit
2bbebded9e
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
bind_recursive_server: False
|
bind_recursive_server: false
|
||||||
bind_authoritative_server: True
|
bind_authoritative_server: true
|
||||||
bind_chroot_set: True
|
bind_chroot_set: true
|
||||||
bind_chroot_path: /var/chroot-bind
|
bind_chroot_path: /var/chroot-bind
|
||||||
bind_systemd_service_path: /etc/systemd/system/bind9.service
|
bind_systemd_service_path: /etc/systemd/system/bind9.service
|
||||||
bind_statistics_file: /var/run/named.stats
|
bind_statistics_file: /var/run/named.stats
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
owner: bind
|
owner: bind
|
||||||
group: bind
|
group: bind
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
force: yes
|
force: true
|
||||||
notify: restart bind
|
notify: restart bind
|
||||||
when: bind_recursive_server
|
when: bind_recursive_server
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
owner: bind
|
owner: bind
|
||||||
group: bind
|
group: bind
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
force: yes
|
force: true
|
||||||
notify: restart bind
|
notify: restart bind
|
||||||
when: bind_authoritative_server
|
when: bind_authoritative_server
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
force: yes
|
force: true
|
||||||
notify:
|
notify:
|
||||||
- reload systemd
|
- reload systemd
|
||||||
- restart bind
|
- restart bind
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
group: adm
|
group: adm
|
||||||
mode: "0640"
|
mode: "0640"
|
||||||
state: touch
|
state: touch
|
||||||
when: bind_chroot_set == False
|
when: not bind_chroot_set
|
||||||
|
|
||||||
- name: touch /var/log/bind_queries.log if non chroot
|
- name: touch /var/log/bind_queries.log if non chroot
|
||||||
file:
|
file:
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
group: adm
|
group: adm
|
||||||
mode: "0640"
|
mode: "0640"
|
||||||
state: touch
|
state: touch
|
||||||
when: bind_chroot_set == False
|
when: not bind_chroot_set
|
||||||
|
|
||||||
- name: send chroot-bind.sh in /root
|
- name: send chroot-bind.sh in /root
|
||||||
copy:
|
copy:
|
||||||
|
@ -73,14 +73,14 @@
|
||||||
dest: /root/chroot-bind.sh
|
dest: /root/chroot-bind.sh
|
||||||
mode: "0700"
|
mode: "0700"
|
||||||
owner: root
|
owner: root
|
||||||
force: yes
|
force: true
|
||||||
backup: yes
|
backup: true
|
||||||
when: bind_chroot_set
|
when: bind_chroot_set
|
||||||
|
|
||||||
- name: exec chroot-bind.sh
|
- name: exec chroot-bind.sh
|
||||||
command: "/root/chroot-bind.sh"
|
command: "/root/chroot-bind.sh"
|
||||||
register: chrootbind_run
|
register: chrootbind_run
|
||||||
changed_when: False
|
changed_when: false
|
||||||
when: bind_chroot_set
|
when: bind_chroot_set
|
||||||
|
|
||||||
- debug:
|
- debug:
|
||||||
|
@ -102,9 +102,9 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
force: yes
|
force: true
|
||||||
notify: restart bind
|
notify: restart bind
|
||||||
when: bind_chroot_set == False
|
when: not bind_chroot_set
|
||||||
|
|
||||||
- name: logrotate for chroot bind
|
- name: logrotate for chroot bind
|
||||||
template:
|
template:
|
||||||
|
@ -113,7 +113,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
force: yes
|
force: true
|
||||||
notify: restart bind
|
notify: restart bind
|
||||||
when: bind_chroot_set
|
when: bind_chroot_set
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
- name: is Munin present ?
|
- name: is Munin present ?
|
||||||
stat:
|
stat:
|
||||||
path: /etc/munin/plugin-conf.d/munin-node
|
path: /etc/munin/plugin-conf.d/munin-node
|
||||||
check_mode: no
|
check_mode: false
|
||||||
register: munin_node_plugins_config
|
register: munin_node_plugins_config
|
||||||
tags:
|
tags:
|
||||||
- bind
|
- bind
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
force: yes
|
force: true
|
||||||
notify: restart munin-node
|
notify: restart munin-node
|
||||||
when: munin_node_plugins_config.stat.exists
|
when: munin_node_plugins_config.stat.exists
|
||||||
tags:
|
tags:
|
||||||
|
|
Loading…
Reference in a new issue