From 806565d2b3eab0c62acc2407dcb23d898ee24e66 Mon Sep 17 00:00:00 2001 From: Adrien Reslinger Date: Tue, 16 Aug 2022 15:40:52 +0200 Subject: [PATCH] Fix lint errors --- tasks/main.yml | 62 ++++++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 1ab55f6..5ea8c41 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,5 +1,6 @@ --- -- block: +- name: base setup + block: - name: Include vars for {{ ansible_os_family }} ansible.builtin.include_vars: "{{ ansible_os_family }}_{{ ansible_distribution_major_version }}.yml" @@ -179,36 +180,37 @@ regexp: '^#compress' replace: 'compress' - - block: - - name: Verify if hosts.deny TCP_Wrappers file exists - ansible.builtin.stat: - path: "/etc/hosts.deny" - register: hostsdeny - check_mode: false - - name: Verify if hosts.allow TCP_Wrappers file exists - ansible.builtin.stat: - path: "/etc/hosts.allow" - register: hostsallow - check_mode: false + - name: TCPWrapper setup + block: + - name: Verify if hosts.deny TCP_Wrappers file exists + ansible.builtin.stat: + path: "/etc/hosts.deny" + register: hostsdeny + check_mode: false + - name: Verify if hosts.allow TCP_Wrappers file exists + ansible.builtin.stat: + path: "/etc/hosts.allow" + register: hostsallow + check_mode: false - - name: Install hosts.deny TCP_Wrappers file - ansible.builtin.copy: - src: "hosts.deny" - dest: "/etc/hosts.deny" - owner: root - group: root - mode: 0644 - when: - - not hostsdeny.stat.exists - - name: Install hosts.allow TCP_Wrappers file - ansible.builtin.copy: - src: "hosts.allow" - dest: "/etc/hosts.allow" - owner: root - group: root - mode: 0644 - when: - - not hostsallow.stat.exists + - name: Install hosts.deny TCP_Wrappers file + ansible.builtin.copy: + src: "hosts.deny" + dest: "/etc/hosts.deny" + owner: root + group: root + mode: 0644 + when: + - not hostsdeny.stat.exists + - name: Install hosts.allow TCP_Wrappers file + ansible.builtin.copy: + src: "hosts.allow" + dest: "/etc/hosts.allow" + owner: root + group: root + mode: 0644 + when: + - not hostsallow.stat.exists when: - ansible_os_family == "RedHat" - ansible_distribution_major_version < '9'