]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
nameserver: Add ability to set named daemon options
authorDavid Galloway <dgallowa@redhat.com>
Thu, 21 Apr 2016 06:41:54 +0000 (02:41 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Fri, 22 Apr 2016 16:37:47 +0000 (12:37 -0400)
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 <dgallowa@redhat.com>
roles/nameserver/defaults/main.yml
roles/nameserver/tasks/config.yml

index 9713692f28494688ebe6713f5d9603599d5a7460..dc2d265ae4a1f93554008fffb7f0e3af72f1d1b8 100644 (file)
@@ -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
index 0899d966357db070505cb80781b8cd7ef924f79a..8de15301dcde9088e400ec0765652ed36f63a1dc 100644 (file)
     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