Unverified Commit 7957214a authored by Mike Green's avatar Mike Green
Browse files

Properly implement default values

parent ca5c4ce3
......@@ -14,12 +14,12 @@ shorewall6_startup: "{{ shorewall_startup }}"
shorewall_interfaces:
- zone: net
interface: "{{ ansible_default_ipv4.interface|default('eth0') }}"
interface: "{{ ansible_default_ipv4.get('interface', 'eth0') }}"
options: "tcpflags,logmartians,routefilter,sourceroute=0"
shorewall6_interfaces:
- zone: net
interface: "{{ ansible_default_ipv6.interface|default('eth0') }}"
interface: "{{ ansible_default_ipv6.get('interface', 'eth0') }}"
options: "tcpflags,nosmurfs,sourceroute=0"
shorewall_masq: []
......
......@@ -23,7 +23,7 @@
- name: Convert Shorewall version var
set_fact:
shorewall_version: "{{ '.'.join( (shorewall_version_result.stdout.split('.') | default([0,0]))[:2] ) }}"
shorewall_version: "{{ '.'.join( shorewall_version_result.get('stdout', '0.0').split('.')[:2] ) }}"
- name: Generate Shorewall configuration files
template:
......
......@@ -23,7 +23,7 @@
- name: Convert Shorewall6 version var
set_fact:
shorewall6_version: "{{ '.'.join( (shorewall6_version_result.stdout.split('.') | default([0,0]))[:2] ) }}"
shorewall6_version: "{{ '.'.join( shorewall6_version_result.get('stdout', '0.0').split('.')[:2] ) }}"
- name: Generate Shorewall6 configuration files
template:
......
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