Skip to content

Commit

Permalink
Changed the default value of ha_cluster_manage_firewall to true.
Browse files Browse the repository at this point in the history
  • Loading branch information
nhosoi committed Aug 24, 2022
1 parent 0ae86fb commit f4f62ff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 0 additions & 12 deletions tasks/firewall.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -39,5 +29,3 @@
vars:
_state_value: "{{ 'enabled' if ha_cluster_manage_firewall | d() |
bool else 'disabled' }}"
when:
- ha_cluster_manage_firewall is defined

0 comments on commit f4f62ff

Please sign in to comment.