forked from ISTI-ansible-roles/ansible-roles
37 lines
1.1 KiB
YAML
37 lines
1.1 KiB
YAML
---
|
|
- block:
|
|
- name: Install the bind packages to setup a dns server
|
|
yum: name={{ bind_packages }} state={{ bind_pkg_state }}
|
|
|
|
- name: Start and enable the bind service
|
|
service: name=named state=started enabled=yes
|
|
when: bind_service_enabled
|
|
|
|
- name: Stop and disable the chroot bind service
|
|
service: name=named-chroot state=stopped enabled=no
|
|
|
|
- name: Stop and disable the bind service
|
|
service: name=named state=stopped enabled=no
|
|
when: not bind_service_enabled
|
|
|
|
when: not bind_use_chroot
|
|
tags: [ 'bind', 'nameserver' ]
|
|
|
|
- block:
|
|
- name: Install the bind packages to setup a dns server in a chroot environment
|
|
yum: name={{ bind_chroot_packages }} state={{ bind_pkg_state }}
|
|
|
|
- name: Start and enable the chroot bind service
|
|
service: name=named-chroot state=started enabled=yes
|
|
when: bind_service_enabled
|
|
|
|
- name: Stop and disable the bind service
|
|
service: name=named state=stopped enabled=no
|
|
|
|
- name: Stop and disable the chroot bind service
|
|
service: name=named-chroot state=stopped enabled=no
|
|
when: not bind_service_enabled
|
|
|
|
when: bind_use_chroot
|
|
tags: [ 'bind', 'nameserver' ]
|