Skip to content

Commit 5837465

Browse files
Merge pull request #25 from conorsch/24-fail-if-unknown-table-is-reported
Fails if target table does not exist
2 parents 26684a4 + b6bef88 commit 5837465

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tasks/rules.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
- name: Load v4 rules
88
command: /etc/iptables.v4.generated
99
register: v4_script_load_result
10-
failed_when: v4_script_load_result.rc != 0 or 'unknown option' in v4_script_load_result.stderr
10+
failed_when: >-
11+
v4_script_load_result.rc != 0 or
12+
'unknown option' in v4_script_load_result.stderr or
13+
'Table does not exist' in v4_script_load_result.stderr
1114
when: v4_script|changed
1215

1316
- name: Generate v6 rules
@@ -18,5 +21,8 @@
1821
- name: Load v6 rules
1922
command: /etc/iptables.v6.generated
2023
register: v6_script_load_result
21-
failed_when: v6_script_load_result.rc != 0 or 'unknown option' in v6_script_load_result.stderr
24+
failed_when: >-
25+
v6_script_load_result.rc != 0 or
26+
'unknown option' in v6_script_load_result.stderr or
27+
'Table does not exist' in v6_script_load_result.stderr
2228
when: v6_script|changed

0 commit comments

Comments
 (0)