27 lines
813 B
YAML
27 lines
813 B
YAML
# SPDX-License-Identifier: MIT
|
|
---
|
|
- name: Ensure that the role runs with default parameters
|
|
hosts: all
|
|
gather_facts: false # test that role works in this case
|
|
roles:
|
|
- linux-system-roles.aide
|
|
tasks:
|
|
- name: Check if file exists
|
|
block:
|
|
- name: Check if the file exists
|
|
ansible.builtin.stat:
|
|
path: "/etc/aide.conf"
|
|
register: file_check
|
|
|
|
- name: Assert that the file exists
|
|
ansible.builtin.assert:
|
|
that:
|
|
- file_check.stat.exists
|
|
fail_msg: "The file does not exist."
|
|
|
|
- name: Check header for not present ansible_managed, fingerprint
|
|
include_tasks: tasks/check_not_present_header.yml
|
|
vars:
|
|
__file: /etc/aide.conf
|
|
__fingerprint: system_role:aide
|