Skip to content

Commit

Permalink
Merge pull request #25 from conorsch/24-fail-if-unknown-table-is-repo…
Browse files Browse the repository at this point in the history
…rted

Fails if target table does not exist
  • Loading branch information
mikegleasonjr authored Oct 4, 2017
2 parents 26684a4 + b6bef88 commit 5837465
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tasks/rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
- name: Load v4 rules
command: /etc/iptables.v4.generated
register: v4_script_load_result
failed_when: v4_script_load_result.rc != 0 or 'unknown option' in v4_script_load_result.stderr
failed_when: >-
v4_script_load_result.rc != 0 or
'unknown option' in v4_script_load_result.stderr or
'Table does not exist' in v4_script_load_result.stderr
when: v4_script|changed

- name: Generate v6 rules
Expand All @@ -18,5 +21,8 @@
- name: Load v6 rules
command: /etc/iptables.v6.generated
register: v6_script_load_result
failed_when: v6_script_load_result.rc != 0 or 'unknown option' in v6_script_load_result.stderr
failed_when: >-
v6_script_load_result.rc != 0 or
'unknown option' in v6_script_load_result.stderr or
'Table does not exist' in v6_script_load_result.stderr
when: v6_script|changed

0 comments on commit 5837465

Please sign in to comment.