]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
dhcp-server: Skip configuring firewalld if not installed 574/head
authorDavid Galloway <dgallowa@redhat.com>
Wed, 27 May 2020 16:08:02 +0000 (12:08 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Wed, 27 May 2020 16:08:53 +0000 (12:08 -0400)
Signed-off-by: David Galloway <dgallowa@redhat.com>
roles/dhcp-server/README.rst
roles/dhcp-server/tasks/main.yml

index 4335502b4b951a7113e9ad146ef863b0f1adf3ff..6cd3fc837be4a201c88e47ca673f0afcb13afd35 100644 (file)
@@ -8,7 +8,7 @@ Notes
 
 This role is heavily modified to be primarily useful for our test labs that only have two or three subnets.  See https://wiki.sepia.ceph.com/doku.php?id=services:networking.
 
-This role checks for firewalld and iptables.  It will configure firewalld unless iptables is running.  It **does not** configure iptables.  At the time the role was created, our DHCP server was running other services and its iptables was already heavily modified and configured.  This reason, along with firewalld being the default in CentOS 7, is why iptables configuration is skipped.
+This role checks for firewalld and iptables.  It will configure firewalld unless iptables is running.  It **does not** configure iptables and will not install or configure firewalld if it's not installed.   At the time the role was created, our DHCP server was running other services and its iptables was already heavily modified and configured.  This reason, along with firewalld being the default in CentOS 7, is why iptables configuration is skipped.
 
 Variables
 +++++++++
index 38e0c6e9b8c9fe509a0924de798a80a9c2183d3a..2c9f9f4629d6ef3c60ce9a102d2bbb70449fb818 100644 (file)
@@ -20,7 +20,9 @@
     name: firewalld
     state: started
     enabled: yes
-  when: iptables_state.rc != 0
+  when:
+    - iptables_state.rc != 0
+    - "'No such file or directory' not in firewalld_state.msg"
 
 - name: Configure firewalld
   firewalld:
@@ -28,7 +30,9 @@
     state: enabled
     permanent: true
     immediate: yes
-  when: iptables_state.rc != 0
+  when:
+    - iptables_state.rc != 0
+    - "'No such file or directory' not in firewalld_state.msg"
 
 - name: Write global dhcpd.conf
   template: