bind: /etc/default/bind9 has been renamed as /etc/default/named

Since Bullseye (Debian 11)
This commit is contained in:
David Prevot 2023-10-30 10:19:16 +01:00
parent 4cba25d8fc
commit 8993242b2c
3 changed files with 19 additions and 5 deletions

View file

@ -10,4 +10,4 @@ Minimal configuration is in `tasks/main.yml`
The full list of variables (with default values) can be found in `defaults/main.yml`.
waening : sync chroot-bind.sh
warning : sync chroot-bind.sh

View file

@ -7,8 +7,10 @@
# Exec this script after `(apt-get|aptitude|apt) install bind9`
# and after *each* bind9 upgrade
# When the script is finished, ensure you have
# 'OPTIONS="-u bind -t /var/chroot-bind"' in /etc/default/bind9
# When the script is finished, ensure you have (since Bullseye)
# 'OPTIONS="-u bind -t /var/chroot-bind"' in /etc/default/named
### or (until Buster)
### 'OPTIONS="-u bind -t /var/chroot-bind"' in /etc/default/bind9
# and /etc/init.d/bind9 (re)start
#
# for Jessie/systemd only:

View file

@ -94,13 +94,25 @@
- bind_chroot_set | bool
- chrootbind_run.stdout | length > 0
- name: Modify OPTIONS in /etc/default/bind9 for chroot
- name: Modify OPTIONS in /etc/default/bind9 for chroot (until Buster)
ansible.builtin.replace:
dest: /etc/default/bind9
regexp: '^OPTIONS=.*'
replace: 'OPTIONS="-u bind -t {{ bind_chroot_path }}"'
notify: restart bind
when: bind_chroot_set | bool
when:
- bind_chroot_set | bool
- ansible_distribution_major_version is version('11', '<')
- name: Modify OPTIONS in /etc/default/named for chroot (since Bullseye)
ansible.builtin.replace:
dest: /etc/default/named
regexp: '^OPTIONS=.*'
replace: 'OPTIONS="-u bind -t {{ bind_chroot_path }}"'
notify: restart bind
when:
- bind_chroot_set | bool
- ansible_distribution_major_version is version('11', '>=')
- name: logrotate for bind
ansible.builtin.template: