diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8f4dcd6..b2c3d81 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,3 +1,4 @@ +--- name: CI on: push: @@ -14,7 +15,7 @@ jobs: - uses: actions/setup-python@v5 with: python-version: '3.10' - cache: 'pip' # caching pip dependencies + cache: 'pip' # caching pip dependencies - name: Ensure requirements are installed run: pip install -r requirements.txt diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..ec4f77b --- /dev/null +++ b/.yamllint @@ -0,0 +1,36 @@ +--- +# Based on ansible-lint config +extends: default +skip_list: + - fqcn-builtins + - role-name + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + colons: + max-spaces-after: -1 + level: error + commas: + max-spaces-after: -1 + level: error + comments: enable + comments-indentation: disable + document-start: disable + empty-lines: + max: 3 + level: error + hyphens: + level: error + indentation: disable + key-duplicates: enable + line-length: disable + new-line-at-end-of-file: enable + new-lines: + type: unix + trailing-spaces: disable + truthy: disable diff --git a/defaults/main.yml b/defaults/main.yml index 509b49d..c2282a8 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -36,61 +36,61 @@ csf_global_ini: - option: UDP_OUT value: "20,21,43,53,113,123,58745,30000:65535" -#csf_allow: -# - 10.10.10.10 -# - 172.16.1.1/29 +# csf_allow: +# - 10.10.10.10 +# - 172.16.1.1/29 -#csf_ignore: -# - 10.10.10.10 -# - 172.16.1.1/29 +# csf_ignore: +# - 10.10.10.10 +# - 172.16.1.1/29 -#csf_pignore: -# - 'exe:/usr/sbin/nginx' -# - 'user:mysql' +# csf_pignore: +# - 'exe:/usr/sbin/nginx' +# - 'user:mysql' -#csf_fignore: -# - '/tmp/\.horde' -# - '/tmp/\.horde/.*' +# csf_fignore: +# - '/tmp/\.horde' +# - '/tmp/\.horde/.*' -#csf_blocklists: -# - "SPAMDROP" +# csf_blocklists: +# - "SPAMDROP" -#csf_dyndns: -# - "no-ip.com" +# csf_dyndns: +# - "no-ip.com" -#csf_csfpre_sh: | -# #!/bin/bash -# /sbin/iptables -t nat -F POSTROUTING +# csf_csfpre_sh: | +# #!/bin/bash +# /sbin/iptables -t nat -F POSTROUTING -#csf_csfpost_sh: | -# #!/bin/bash -# /sbin/iptables -t nat -F POSTROUTING +# csf_csfpost_sh: | +# #!/bin/bash +# /sbin/iptables -t nat -F POSTROUTING # Host based custom allow rules -#csf_allow_host: -# - 'tcp|in|d=22|s=1.1.1.1' +# csf_allow_host: +# - 'tcp|in|d=22|s=1.1.1.1' -#csf_ignore_host: -# - '1.1.1.1' +# csf_ignore_host: +# - '1.1.1.1' -#csf_pignore_host: -# - 'exe:/usr/sbin/nginx' -# - 'user:mysql' +# csf_pignore_host: +# - 'exe:/usr/sbin/nginx' +# - 'user:mysql' -#csf_fignore_host: -# - '/tmp/\.horde' -# - '/tmp/\.horde/.*' +# csf_fignore_host: +# - '/tmp/\.horde' +# - '/tmp/\.horde/.*' -#csf_blocklists_host: -# - "SPAMDROP" +# csf_blocklists_host: +# - "SPAMDROP" -#csf_dyndns_host: -# - "no-ip.com" +# csf_dyndns_host: +# - "no-ip.com" -#csf_csfpre_sh_host: | -# #!/bin/bash -# /sbin/iptables -t nat -F POSTROUTING +# csf_csfpre_sh_host: | +# #!/bin/bash +# /sbin/iptables -t nat -F POSTROUTING -#csf_csfpost_sh_host: | -# #!/bin/bash -# /sbin/iptables -t nat -F POSTROUTING \ No newline at end of file +# csf_csfpost_sh_host: | +# #!/bin/bash +# /sbin/iptables -t nat -F POSTROUTING diff --git a/meta/main.yml b/meta/main.yml index 0c46386..233a857 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -2,32 +2,34 @@ dependencies: [] galaxy_info: - author: cybercinch - description: Install and configure CSF/LFD (https://configserver.com/cp/csf.html) - min_ansible_version: "2.9" - license: MIT - platforms: - - name: EL - versions: - - "6" - - "7" - - "8" - - "9" - - name: Debian - versions: - - wheezy - - jessie - - stretch - - name: Ubuntu - versions: - - precise - - trusty - - xenial - - bionic - galaxy_tags: - - csf - - lfd - - firewall - - iptables - - networking - - system + author: cybercinch + description: > + Install and configure CSF/LFD + (https://configserver.com/cp/csf.html) + min_ansible_version: "2.9" + license: MIT + platforms: + - name: EL + versions: + - "6" + - "7" + - "8" + - "9" + - name: Debian + versions: + - wheezy + - jessie + - stretch + - name: Ubuntu + versions: + - precise + - trusty + - xenial + - bionic + galaxy_tags: + - csf + - lfd + - firewall + - iptables + - networking + - system