Merge "Introduce iptables_package var"

This commit is contained in:
Zuul 2022-01-19 15:59:39 +00:00 committed by Gerrit Code Review
commit 13167d7a21
7 changed files with 46 additions and 4 deletions

View File

@ -1,2 +1,10 @@
Configures the inventory private and public addresses in a multi-node job in
iptables in order to allow traffic to and from each node without restrictions.
Multinode firewall is configured.
This role is intended to install iptables and configure firewall.
**Role Variables**
.. zuul:rolevar:: iptables_package
:default: iptables
Install the distribution package for Iptables.

View File

@ -0,0 +1,2 @@
---
iptables_package: "iptables"

View File

@ -1,7 +1,16 @@
- name: Ensure iptables
- name: Include operating system specific vars
include_vars: "{{ zj_distro_os }}"
with_first_found:
- "{{ ansible_distribution }}.yaml"
- "{{ ansible_os_family }}.yaml"
- "default.yaml"
loop_control:
loop_var: zj_distro_os
- name: 'Ensure {{ iptables_package }}'
become: true
package:
name: iptables
name: "{{ iptables_package }}"
- name: Set up the host ip addresses
set_fact:

View File

@ -0,0 +1,7 @@
---
iptables_package: >-
{% if ansible_distribution_major_version|int <= 8 -%}
iptables
{%- else -%}
iptables-nft
{%- endif %}

View File

@ -0,0 +1,7 @@
---
iptables_package: >-
{% if ansible_distribution_major_version|int <= 33 -%}
iptables
{%- else -%}
iptables-nft
{%- endif %}

View File

@ -0,0 +1,7 @@
---
iptables_package: >-
{% if ansible_distribution_major_version|int <= 8 -%}
iptables
{%- else -%}
iptables-nft
{%- endif %}

View File

@ -0,0 +1,2 @@
---
iptables_package: "iptables"