7.5. Configuring file integrity checks with the aide RHEL system role


You can configure Advanced Intrusion Detection Environment (AIDE) consistently across multiple systems by using the aide RHEL system role. The role automatically installs the aide package on all managed nodes.

Depending on your configuration, the aide role can perform the following actions:

  • Initialize the AIDE database and store it on the control node
  • Run AIDE integrity checks on the managed nodes
  • Update the AIDE database and store it on the control node

Prerequisites

Procedure

  1. Create a playbook file, for example, ~/playbook.yml, with the following content:

    ---
    - name: Configure system integrity
      hosts: managed-node-01.example.com
      tasks:
        - name: Configure file integrity checks with AIDE
          ansible.builtin.include_role:
            name: rhel-system-roles.aide.aide
          vars:
            aide_db_fetch_dir: files
            aide_init: true
            aide_check: false
            aide_update: false
            aide_cron_check: true
            aide_cron_interval: 0 12 * * *

    The settings specified in the example playbook include the following:

    aide_db_fetch_dir: files
    Specifies the directory on the Ansible Control Node (ACN) for storing the AIDE database fetched from the remote nodes. With the default files value, the role stores the database in the same directory as the playbook. To store the database files somewhere else, specify a different path.
    aide_check: false
    Runs an integrity check on the remote nodes.
    aide_update: false
    Updates the AIDE database and stores it on the control node.
    aide_cron_check: true
    Configures a periodic cron job that activates AIDE integrity checks on the managed nodes.
    aide_cron_interval: 0 12 * * *

    Sets the interval for the cron job in the format <minute> <hour> <day_of_month> <month> <day of week>. The value 0 12 * * * sets it to run every day at noon.

    For details about all variables used in the playbook, see the /usr/share/ansible/roles/rhel-system-roles.aide/README.md file on the control node.

  2. Validate the playbook syntax:

    $ ansible-playbook --syntax-check ~/playbook.yml

    Note that this command only validates the syntax and does not protect against a wrong but valid configuration.

  3. Run the playbook:

    $ ansible-playbook ~/playbook.yml
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동