fix: Apply linter fixes 🚨
Some checks failed
CI / lint (push) Failing after 13s
CI / release (push) Has been skipped
CI / notify (push) Has been skipped

This commit is contained in:
2024-08-20 11:32:48 +12:00
parent 744235ec45
commit 50725f0195
5 changed files with 18 additions and 16 deletions

View File

@@ -4,15 +4,15 @@ dependencies: []
galaxy_info: galaxy_info:
author: cybercinch author: cybercinch
description: Install and configure CSF/LFD (https://configserver.com/cp/csf.html) description: Install and configure CSF/LFD (https://configserver.com/cp/csf.html)
min_ansible_version: 2.9 min_ansible_version: "2.9"
license: MIT license: MIT
platforms: platforms:
- name: EL - name: EL
versions: versions:
- 6 - "6"
- 7 - "7"
- 8 - "8"
- 9 - "9"
- name: Debian - name: Debian
versions: versions:
- wheezy - wheezy

View File

@@ -20,7 +20,7 @@
- name: edit csf.{allow,ignore,pignore,fignore,dyndns} - name: edit csf.{allow,ignore,pignore,fignore,dyndns}
template: template:
src: '{{ item }}.j2' src: '{{ item }}.j2'
dest: '/etc/csf/{{ item }}' dest: '/etc/csf/{{ item }}'
owner: root owner: root
group: root group: root
@@ -59,7 +59,7 @@
regexp: '^#{{ item }}\|(.*)$' regexp: '^#{{ item }}\|(.*)$'
line: '{{ item }}|\1' line: '{{ item }}|\1'
state: present state: present
backrefs: yes backrefs: true
loop: '{{ csf_blocklists }}' loop: '{{ csf_blocklists }}'
when: csf_blocklists is defined when: csf_blocklists is defined
notify: notify:

View File

@@ -5,7 +5,7 @@
service: service:
name: firewalld name: firewalld
state: stopped state: stopped
enabled: no enabled: false
when: when:
- ansible_facts.os_family == 'RedHat' - ansible_facts.os_family == 'RedHat'
- ansible_facts.service_mgr == 'systemd' - ansible_facts.service_mgr == 'systemd'
@@ -17,7 +17,7 @@
service: service:
name: ufw name: ufw
state: stopped state: stopped
enabled: no enabled: false
when: when:
- ansible_facts.distribution == 'Ubuntu' - ansible_facts.distribution == 'Ubuntu'
ignore_errors: true ignore_errors: true

View File

@@ -5,7 +5,7 @@
package: package:
name: '{{ item }}' name: '{{ item }}'
state: present state: present
update_cache: yes update_cache: true
with_flattened: with_flattened:
- '{{ csf_required_packages }}' - '{{ csf_required_packages }}'
- '{{ csf_required_packages_dist }}' - '{{ csf_required_packages_dist }}'
@@ -19,7 +19,7 @@
- name: download csf.tgz - name: download csf.tgz
get_url: get_url:
url: 'https://download.configserver.com/csf.tgz' url: 'https://download.configserver.com/csf.tgz'
dest: '{{ csf_tmp_dir }}/csf.tgz' dest: '{{ csf_tmp_dir }}/csf.tgz'
checksum: 'sha256:https://www.configserver.com/checksums.txt' checksum: 'sha256:https://www.configserver.com/checksums.txt'
when: not csf_sbin_file.stat.exists when: not csf_sbin_file.stat.exists
@@ -27,10 +27,10 @@
- download - download
- name: unpack csf.tgz - name: unpack csf.tgz
unarchive: # noqa 208 unarchive: # noqa 208
src: '{{ csf_tmp_dir }}/csf.tgz' src: '{{ csf_tmp_dir }}/csf.tgz'
dest: '{{ csf_tmp_dir }}' dest: '{{ csf_tmp_dir }}'
remote_src: yes remote_src: true
creates: '{{ csf_tmp_dir }}/csf/install.sh' creates: '{{ csf_tmp_dir }}/csf/install.sh'
when: not csf_sbin_file.stat.exists when: not csf_sbin_file.stat.exists

View File

@@ -4,7 +4,9 @@
- name: include OS-specific variables - name: include OS-specific variables
include_vars: '{{ item }}' include_vars: '{{ item }}'
with_first_found: with_first_found:
- '{{ ansible_facts.os_family }}-{{ ansible_facts.distribution_major_version }}.yml' - >
{{ ansible_facts.os_family }}-
{{ ansible_facts.distribution_major_version }}.yml
- '{{ ansible_facts.os_family }}.yml' - '{{ ansible_facts.os_family }}.yml'
- 'main.yml' - 'main.yml'
tags: tags:
@@ -28,7 +30,7 @@
service: service:
name: '{{ item }}' name: '{{ item }}'
state: started state: started
enabled: yes enabled: true
loop: loop:
- csf - csf
- lfd - lfd