Commit 7f997b8e authored by nanahira's avatar nanahira

iptables column

parent 950e835e
...@@ -21,14 +21,15 @@ ...@@ -21,14 +21,15 @@
shell: iptables --version | grep nf_tables shell: iptables --version | grep nf_tables
register: iptables_type_result register: iptables_type_result
failed_when: iptables_type_result.rc > 1 failed_when: iptables_type_result.rc > 1
when: iptables_type == 'auto'
- name: use iptables-legacy - name: use iptables-legacy
set_fact: set_fact:
iptables_type: legacy iptables_type: legacy
when: iptables_type_result.rc == 1 when: iptables_type == 'auto' and iptables_type_result.rc == 1
- name: use iptables-nft - name: use iptables-nft
set_fact: set_fact:
iptables_type: nft iptables_type: nft
when: iptables_type_result.rc == 0 when: iptables_type == 'auto' and iptables_type_result.rc == 0
- name: post scripts - name: post scripts
template: template:
src: scripts/{{item}}.sh.j2 src: scripts/{{item}}.sh.j2
......
...@@ -302,6 +302,7 @@ class InventoryBuilder { ...@@ -302,6 +302,7 @@ class InventoryBuilder {
masqInterfaces, masqInterfaces,
dockerServices: host.dockerServices, dockerServices: host.dockerServices,
routePlans, routePlans,
iptables_type: host.iptables || 'auto',
}; };
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment