Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Use supported ansible-lint action; run ansible-lint against the collection #200

Merged
merged 1 commit into from
Jan 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# Default state for all rules
default: true

Expand Down
3 changes: 0 additions & 3 deletions .sanity-ansible-ignore-2.12.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
plugins/modules/firewall_lib.py validate-modules:missing-gplv3-license
plugins/modules/firewall_lib_facts.py validate-modules:missing-gplv3-license
plugins/modules/firewall_lib.py validate-modules:missing-examples
roles/firewall/files/get_files_checksums.sh shebang!skip
tests/firewall/files/test_ping.sh shebang!skip
3 changes: 0 additions & 3 deletions .sanity-ansible-ignore-2.13.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
plugins/modules/firewall_lib.py validate-modules:missing-gplv3-license
plugins/modules/firewall_lib_facts.py validate-modules:missing-gplv3-license
plugins/modules/firewall_lib.py validate-modules:missing-examples
roles/firewall/files/get_files_checksums.sh shebang!skip
tests/firewall/files/test_ping.sh shebang!skip
3 changes: 0 additions & 3 deletions .sanity-ansible-ignore-2.14.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
plugins/modules/firewall_lib.py validate-modules:missing-gplv3-license
plugins/modules/firewall_lib_facts.py validate-modules:missing-gplv3-license
plugins/modules/firewall_lib.py validate-modules:missing-examples
roles/firewall/files/get_files_checksums.sh shebang!skip
tests/firewall/files/test_ping.sh shebang!skip
3 changes: 0 additions & 3 deletions .sanity-ansible-ignore-2.15.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
plugins/modules/firewall_lib.py validate-modules:missing-gplv3-license
plugins/modules/firewall_lib_facts.py validate-modules:missing-gplv3-license
plugins/modules/firewall_lib.py validate-modules:missing-examples
roles/firewall/files/get_files_checksums.sh shebang!skip
tests/firewall/files/test_ping.sh shebang!skip
3 changes: 0 additions & 3 deletions .sanity-ansible-ignore-2.9.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
plugins/modules/firewall_lib.py validate-modules:missing-gplv3-license
plugins/modules/firewall_lib_facts.py validate-modules:missing-gplv3-license
plugins/modules/firewall_lib.py validate-modules:missing-examples
roles/firewall/files/get_files_checksums.sh shebang!skip
tests/firewall/files/test_ping.sh shebang!skip
2 changes: 1 addition & 1 deletion files/get_files_checksums.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -euo pipefail

Expand Down
18 changes: 18 additions & 0 deletions library/firewall_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,23 @@
required: false
type: list
elements: str
default: []
port:
description:
List of ports or port range strings.
The format of a port needs to be port=<port>[-<port>]/<protocol>.
required: false
type: list
elements: str
default: []
source_port:
description:
List of source port or port range strings.
The format of a source port needs to be port=<port>[-<port>]/<protocol>.
required: false
type: list
elements: str
default: []
forward_port:
description:
List of forward port strings or dicts,
Expand All @@ -82,6 +85,7 @@
aliases: ["port_forward"]
required: false
type: raw
default: []
masquerade:
description:
The masquerade bool setting.
Expand All @@ -94,6 +98,7 @@
required: false
type: list
elements: str
default: []
source:
description:
List of source address, address range strings, or ipsets
Expand All @@ -104,26 +109,30 @@
required: false
type: list
elements: str
default: []
interface:
description:
List of interface name strings.
required: false
type: list
elements: str
default: []
interface_pci_id:
description:
List of inteface PCI device ID strings.
PCI device ID needs to correspond to a named network interface.
required: false
type: list
elements: str
default: []
icmp_block:
description:
List of ICMP type strings to block.
The ICMP type names needs to be defined in firewalld configuration.
required: false
type: list
elements: str
default: []
icmp_block_inversion:
description:
ICMP block inversion bool setting.
Expand Down Expand Up @@ -178,6 +187,7 @@
required: false
type: list
elements: str
default: []
permanent:
description:
The permanent bool flag.
Expand Down Expand Up @@ -222,12 +232,14 @@
required: false
type: list
elements: str
default: []
helper_module:
description:
List of netfiler kernel helper module names
required: false
type: list
elements: str
default: []
destination:
description:
List of IPv4/IPv6 addresses with optional mask
Expand All @@ -237,6 +249,7 @@
required: false
type: list
elements: str
default: []
__report_changed:
description:
If false, do not report changed true even if changed.
Expand All @@ -245,6 +258,11 @@
default: true
"""

EXAMPLES = """
firewall:
- port: ['443/tcp', '443/udp']
"""

from ansible.module_utils.basic import AnsibleModule
import re
import os
Expand Down
2 changes: 1 addition & 1 deletion tests/files/test_ping.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Author - Brennan Paciorek <[email protected]>
# Description - Benchmark firewalld downtime while reloading and while restarting
# by measuring how many packets are dropped while firewalld is restarting/reloading
Expand Down