From f4f62ff40fea81c060924d7604b61c7255bff582 Mon Sep 17 00:00:00 2001 From: Noriko Hosoi Date: Wed, 24 Aug 2022 15:33:57 -0700 Subject: [PATCH] Changed the default value of ha_cluster_manage_firewall to true. --- README.md | 4 +--- defaults/main.yml | 2 ++ tasks/firewall.yml | 12 ------------ 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 34ab6210..6ac92f7e 100644 --- a/README.md +++ b/README.md @@ -838,15 +838,13 @@ You may take a look at #### `ha_cluster_manage_firewall` -boolean, default: undefined +boolean, default: true Manage the `firewall high-availability service` as well as the `fence-virt port`. When `ha_cluster_manage_firewall` is `true`, the `firewall high-availability service` and `fence-virt port` are enabled. When `ha_cluster_manage_firewall` is `false`, the `firewall high-availability service` and `fence-virt port` are disabled. -When `ha_cluster_manage_firewall` is undefined and `firewalld.service` -is in `ansible_facts.services`, `ha_cluster_manage_firewall` is set to true. ### Inventory diff --git a/defaults/main.yml b/defaults/main.yml index 028b99f8..606b1b70 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -48,3 +48,5 @@ ha_cluster_constraints_location: [] ha_cluster_constraints_colocation: [] ha_cluster_constraints_order: [] ha_cluster_constraints_ticket: [] + +ha_cluster_manage_firewall: true diff --git a/tasks/firewall.yml b/tasks/firewall.yml index 2c1289be..2460370b 100644 --- a/tasks/firewall.yml +++ b/tasks/firewall.yml @@ -1,15 +1,5 @@ # SPDX-License-Identifier: MIT --- -- name: Get services status - detect firewall - service_facts: - -- name: Set ha_cluster_manage_firewall to true if the service is already enabled - set_fact: - ha_cluster_manage_firewall: true - when: - - '"firewalld.service" in ansible_facts.services' - - ha_cluster_manage_firewall is not defined - - block: - name: Initialize firewall option set_fact: @@ -39,5 +29,3 @@ vars: _state_value: "{{ 'enabled' if ha_cluster_manage_firewall | d() | bool else 'disabled' }}" - when: - - ha_cluster_manage_firewall is defined