~craftyguy/ansible-nftables

bba55fd3e98f3c59a1f501d3123a9d1013e30466 — Clayton Craft 2 years ago 11ddb4b
Fix loop_control / loop_var re-use warning from ansible
2 files changed, 10 insertions(+), 9 deletions(-)

M README.md
M tasks/01-validate.yml
M README.md => README.md +1 -0
@@ 4,6 4,7 @@ With the following changes/fixes:

- Add support for Alpine Linux
- Simply nftables install task
- Fixed loop_control / loop_var re-use warning from ansible


[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-green.svg)](https://conventionalcommits.org)

M tasks/01-validate.yml => tasks/01-validate.yml +9 -9
@@ 19,18 19,18 @@
  delegate_to: localhost
  assert:
    that:
      - "nftables_ruleset.family == 'ip' or
        nftables_ruleset.family == 'arp' or
        nftables_ruleset.family == 'ip6' or
        nftables_ruleset.family == 'bridge' or
        nftables_ruleset.family == 'inet' or
        nftables_ruleset.family == 'netdev'"
    msg: "The table family must be 'ip', 'ip6', 'inet', 'arp', 'bridge' or 'netdev' (not '{{ nftables_ruleset.family }}')"
      - "nftables_rule.family == 'ip' or
        nftables_rule.family == 'arp' or
        nftables_rule.family == 'ip6' or
        nftables_rule.family == 'bridge' or
        nftables_rule.family == 'inet' or
        nftables_rule.family == 'netdev'"
    msg: "The table family must be 'ip', 'ip6', 'inet', 'arp', 'bridge' or 'netdev' (not '{{ nftables_rule.family }}')"
    quiet: yes
  loop: "{{ nftables_ruleset }}"
  loop_control:
    label: "{{ nftables_ruleset.family }}"
    loop_var: nftables_ruleset
    label: "{{ nftables_rule.family }}"
    loop_var: nftables_rule
  when:
    - nftables_ruleset is defined
    - nftables_ruleset | length > 0