From 50725f0195efcf5d12fd8b31c2534e2f9894d1ff Mon Sep 17 00:00:00 2001 From: Aaron Guise Date: Tue, 20 Aug 2024 11:32:48 +1200 Subject: [PATCH] =?UTF-8?q?fix:=20Apply=20linter=20fixes=20=F0=9F=9A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- meta/main.yml | 10 +++++----- tasks/configure.yml | 4 ++-- tasks/disable_firewall.yml | 4 ++-- tasks/install.yml | 10 +++++----- tasks/main.yml | 6 ++++-- 5 files changed, 18 insertions(+), 16 deletions(-) diff --git a/meta/main.yml b/meta/main.yml index a009ad9..0c46386 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -4,15 +4,15 @@ dependencies: [] galaxy_info: author: cybercinch description: Install and configure CSF/LFD (https://configserver.com/cp/csf.html) - min_ansible_version: 2.9 + min_ansible_version: "2.9" license: MIT platforms: - name: EL versions: - - 6 - - 7 - - 8 - - 9 + - "6" + - "7" + - "8" + - "9" - name: Debian versions: - wheezy diff --git a/tasks/configure.yml b/tasks/configure.yml index 241bf7e..728a56c 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -20,7 +20,7 @@ - name: edit csf.{allow,ignore,pignore,fignore,dyndns} template: - src: '{{ item }}.j2' + src: '{{ item }}.j2' dest: '/etc/csf/{{ item }}' owner: root group: root @@ -59,7 +59,7 @@ regexp: '^#{{ item }}\|(.*)$' line: '{{ item }}|\1' state: present - backrefs: yes + backrefs: true loop: '{{ csf_blocklists }}' when: csf_blocklists is defined notify: diff --git a/tasks/disable_firewall.yml b/tasks/disable_firewall.yml index f73f19b..fdec642 100644 --- a/tasks/disable_firewall.yml +++ b/tasks/disable_firewall.yml @@ -5,7 +5,7 @@ service: name: firewalld state: stopped - enabled: no + enabled: false when: - ansible_facts.os_family == 'RedHat' - ansible_facts.service_mgr == 'systemd' @@ -17,7 +17,7 @@ service: name: ufw state: stopped - enabled: no + enabled: false when: - ansible_facts.distribution == 'Ubuntu' ignore_errors: true diff --git a/tasks/install.yml b/tasks/install.yml index 69dc429..dd274a6 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -5,7 +5,7 @@ package: name: '{{ item }}' state: present - update_cache: yes + update_cache: true with_flattened: - '{{ csf_required_packages }}' - '{{ csf_required_packages_dist }}' @@ -19,7 +19,7 @@ - name: download csf.tgz get_url: - url: 'https://download.configserver.com/csf.tgz' + url: 'https://download.configserver.com/csf.tgz' dest: '{{ csf_tmp_dir }}/csf.tgz' checksum: 'sha256:https://www.configserver.com/checksums.txt' when: not csf_sbin_file.stat.exists @@ -27,10 +27,10 @@ - download - name: unpack csf.tgz - unarchive: # noqa 208 - src: '{{ csf_tmp_dir }}/csf.tgz' + unarchive: # noqa 208 + src: '{{ csf_tmp_dir }}/csf.tgz' dest: '{{ csf_tmp_dir }}' - remote_src: yes + remote_src: true creates: '{{ csf_tmp_dir }}/csf/install.sh' when: not csf_sbin_file.stat.exists diff --git a/tasks/main.yml b/tasks/main.yml index 9626374..f4f32be 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -4,7 +4,9 @@ - name: include OS-specific variables include_vars: '{{ item }}' 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' - 'main.yml' tags: @@ -28,7 +30,7 @@ service: name: '{{ item }}' state: started - enabled: yes + enabled: true loop: - csf - lfd