From: David Galloway Date: Thu, 21 Apr 2016 06:41:54 +0000 (-0400) Subject: nameserver: Add ability to set named daemon options X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=db71d4c3b2f8c2e7072d64a4fa39b373b3ca44b0;p=ceph-cm-ansible.git nameserver: Add ability to set named daemon options The variable in defaults/main.yml will leave /etc/sysconfig/named empty which is the package default. We want IPv4 only however. This is set in the secrets repo. Signed-off-by: David Galloway --- diff --git a/roles/nameserver/defaults/main.yml b/roles/nameserver/defaults/main.yml index 9713692f..dc2d265a 100644 --- a/roles/nameserver/defaults/main.yml +++ b/roles/nameserver/defaults/main.yml @@ -15,6 +15,7 @@ named_conf_listen_iface: - 127.0.0.1 - "{{ ansible_all_ipv4_addresses[0] }}" named_conf_zones_path: "/var/named/zones" +named_conf_daemon_opts: "" # Zone file conf vars named_conf_soa_ttl: 3600 diff --git a/roles/nameserver/tasks/config.yml b/roles/nameserver/tasks/config.yml index 0899d966..8de15301 100644 --- a/roles/nameserver/tasks/config.yml +++ b/roles/nameserver/tasks/config.yml @@ -11,3 +11,12 @@ validate: named-checkconf %s notify: restart named with_dict: "{{ named_domains }}" + +- name: Apply named daemon options + lineinfile: + dest: /etc/sysconfig/named + regexp: '^OPTIONS=' + line: "OPTIONS=\"{{ named_conf_daemon_opts }}\"" + state: present + create: True + notify: restart named