Merge "Add some missing bind service parameters"

This commit is contained in:
Zuul 2021-10-09 14:46:34 +00:00 committed by Gerrit Code Review
commit bd4f466991
7 changed files with 59 additions and 17 deletions

View File

@ -1,3 +1,3 @@
---
designate_named_conf_path: '/var/lib/config-data/ansible-generated/designate/etc/named.conf'
designate_named_conf_path: '/var/lib/config-data/ansible-generated/designate/etc'
rndc_allowed_addresses: ['127.0.0.1']

View File

@ -17,5 +17,10 @@
- name: Converge
hosts: all
roles:
- role: "designate_bind_config"
tasks:
- name: Configure bind
include_role:
name: designate_bind_config
vars:
designate_named_conf_path: "/etc"
ctlplane_ip: "192.168.24.32"

View File

@ -2,11 +2,29 @@
- name: ensure target directory exists
become: true
file:
path: "{{ designate_named_conf_path|dirname }}"
state: directory
path: "{{ designate_named_conf_path}}/named"
state: directory
- name: generate named/options.conf
become: true
template:
src: options.conf.j2
dest: "{{ designate_named_conf_path }}/named/options.conf"
- name: generate named/rndc.conf
become: true
template:
src: rndc.conf.j2
dest: "{{ designate_named_conf_path}}/named/rndc.conf"
- name: generate named/logging.conf
become: true
template:
src: logging.conf.j2
dest: "{{ designate_named_conf_path}}/named/logging.conf"
- name: generate named.conf
become: true
template:
src: named.conf.j2
dest: "{{ designate_named_conf_path }}"
src: named.conf.j2
dest: "{{ designate_named_conf_path}}/named.conf"

View File

@ -0,0 +1 @@
# TBD

View File

@ -1,11 +1,5 @@
include "/etc/named/rndc.conf";
include "/etc/rndc.key";
options {
allow-new-zones yes;
minimal-responses yes;
directory "/var/named-persistent";
};
controls {
inet {{ external_ip|default(ctlplane_ip)|default('127.0.0.1') }} allow { {{ rndc_allowed_addresses|join(';') }}; } keys { "rndc-key"; };
};
include "/etc/named/options.conf";
include "/etc/named.rfc1912.zones";
include "/etc/named/logging.conf";

View File

@ -0,0 +1,21 @@
options {
allow-new-zones yes;
directory "/var/named-persistent";
{% if external_ip|default(ctlplane_ip)|ipv4 %}
listen-on port 53 { {{ external_ip|default(ctlplane_ip) }}; };
{% elif external_ip|default(ctlplane_ip)|ipv6 %}
listen-on-v6 port 53 { {{ external_ip|default(ctlplane_ip) }}; };
{% endif %}
{% if bind_lmdb_mapsize is defined %}
lmdb-mapsize {{ bind_lmdb_mapsize }};
{% endif %}
minimal-responses yes;
multi-master yes;
querylog no;
recursion no;
version none;
allow-query-cache { none; };
};

View File

@ -0,0 +1,3 @@
controls {
inet {{ external_ip|default(ctlplane_ip)|default('127.0.0.1') }} allow { {{ rndc_allowed_addresses|join(';') }}; } keys { "rndc-key"; };
};