Fix whens on one line

Signed-off-by: Radovan Sroka <rsroka@redhat.com>
This commit is contained in:
Radovan Sroka
2024-11-12 11:15:10 +01:00
committed by Sergei Petrosian
parent 1409ace70d
commit 19d326275e
2 changed files with 8 additions and 20 deletions
-2
View File
@@ -13,8 +13,6 @@ This is an ansible role that installs and configures the [Advanced Intrusion Det
* It runs AIDE integrity checks on the remote nodes
* It updates the AIDE databases and stores them on the controller node
### Available tags to control and use the role
## What does this role not do for you?
* It does not explain how to create a good AIDE configuration that suits your requirements; that task remains for you to accomplish
+8 -18
View File
@@ -23,17 +23,13 @@
src: "{{ aide_db_template }}"
dest: "/etc/{{ __aide_config }}"
mode: "0400"
when:
- aide_db_template is defined
- aide_db_template is not none
- aide_db_template is string
when: aide_db_template is not none
# - name: Print Header
# ansible.builtin.shell: head /etc/aide.conf || true
- name: Initialize AIDE database
when:
- aide_init | bool
when: aide_init | bool
block:
- name: Initialize AIDE database
ansible.builtin.command:
@@ -49,19 +45,16 @@
group: root
mode: "0440"
force: true
when:
- not aide_fetch_db | bool
when: not aide_fetch_db | bool
- name: Remove remote AIDE database file
ansible.builtin.file:
path: "{{ __aide_db_new_name }}"
state: absent
when:
- not aide_fetch_db | bool
when: not aide_fetch_db | bool
- name: Fetch AIDE database
when:
- aide_fetch_db | bool
when: aide_fetch_db | bool
block:
- name: Fetch AIDE database
ansible.builtin.fetch:
@@ -74,8 +67,7 @@
state: absent
- name: Check AIDE integrity
when:
- aide_check | bool
when: aide_check | bool
block:
- name: Copy AIDE reference database
ansible.builtin.copy:
@@ -85,8 +77,7 @@
owner: root
group: root
mode: "0440"
when:
- aide_fetch_db | bool
when: aide_fetch_db | bool
- name: Check against AIDE reference database
ansible.builtin.command:
@@ -94,8 +85,7 @@
changed_when: true
- name: Update AIDE database and fetch it
when:
- aide_update | bool
when: aide_update | bool
block:
- name: Update AIDE database
ansible.builtin.command: