{"id":19569079,"url":"https://github.com/buluma/ansible-role-auditd","last_synced_at":"2026-01-05T01:47:53.267Z","repository":{"id":40394480,"uuid":"454641989","full_name":"buluma/ansible-role-auditd","owner":"buluma","description":"Install and configure auditd on your system.","archived":false,"fork":false,"pushed_at":"2024-07-19T00:07:06.000Z","size":117,"stargazers_count":1,"open_issues_count":9,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-29T02:05:47.983Z","etag":null,"topics":["ansible","ansible-role","auditd","molecule","tox"],"latest_commit_sha":null,"homepage":"https://galaxy.ansible.com/buluma/auditd","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/buluma.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"buluma"}},"created_at":"2022-02-02T04:26:01.000Z","updated_at":"2024-07-19T00:07:10.000Z","dependencies_parsed_at":"2023-02-08T12:16:03.067Z","dependency_job_id":"19e7d367-b7a3-496f-8ea2-8f64abb794e7","html_url":"https://github.com/buluma/ansible-role-auditd","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buluma%2Fansible-role-auditd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buluma%2Fansible-role-auditd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buluma%2Fansible-role-auditd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buluma%2Fansible-role-auditd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buluma","download_url":"https://codeload.github.com/buluma/ansible-role-auditd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245153204,"owners_count":20569400,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-role","auditd","molecule","tox"],"created_at":"2024-11-11T06:07:28.662Z","updated_at":"2026-01-05T01:47:53.241Z","avatar_url":"https://github.com/buluma.png","language":"Jinja","funding_links":["https://github.com/sponsors/buluma"],"categories":[],"sub_categories":[],"readme":"# Ansible role [auditd](https://galaxy.ansible.com/ui/standalone/roles/buluma/auditd/documentation)\n\nInstall and configure auditd on your system.\n\n|GitHub|Version|Issues|Pull Requests|Downloads|\n|------|-------|------|-------------|---------|\n|[![github](https://github.com/buluma/ansible-role-auditd/actions/workflows/molecule.yml/badge.svg)](https://github.com/buluma/ansible-role-auditd/actions/workflows/molecule.yml)|[![Version](https://img.shields.io/github/release/buluma/ansible-role-auditd.svg)](https://github.com/buluma/ansible-role-auditd/releases/)|[![Issues](https://img.shields.io/github/issues/buluma/ansible-role-auditd.svg)](https://github.com/buluma/ansible-role-auditd/issues/)|[![PullRequests](https://img.shields.io/github/issues-pr-closed-raw/buluma/ansible-role-auditd.svg)](https://github.com/buluma/ansible-role-auditd/pulls/)|[![Ansible Role](https://img.shields.io/ansible/role/d/buluma/auditd)](https://galaxy.ansible.com/ui/standalone/roles/buluma/auditd/documentation)|\n\n## [Example Playbook](#example-playbook)\n\nThis example is taken from [`molecule/default/converge.yml`](https://github.com/buluma/ansible-role-auditd/blob/master/molecule/default/converge.yml) and is tested on each push, pull request and release.\n\n```yaml\n---\n- name: Converge\n  hosts: all\n  become: true\n  gather_facts: true\n\n  roles:\n    - role: buluma.auditd\n      auditd_start_service: false\n      auditd_local_events: \"no\"\n      auditd_rules:\n        - file: /var/log/audit/\n          keyname: auditlog\n        - file: /etc/audit/\n          permissions:\n            - write\n            - attribute_change\n          keyname: auditconfig\n        - file: /etc/libaudit.conf\n          permissions:\n            - write\n            - attribute_change\n          keyname: auditconfig\n        - file: /etc/audisp/\n          permissions:\n            - write\n            - attribute_change\n          keyname: audispconfig\n        - file: /sbin/auditctl\n          permissions:\n            - execute\n          keyname: audittools\n        - file: /sbin/auditd\n          permissions:\n            - execute\n          keyname: audittools\n        - syscall: open\n          action: always\n          filter: exit\n          filters:\n            - auid!=4294967295\n            - auid!=unset\n          keyname: my_keyname\n          arch: b32\n        - syscall: adjtimex\n          action: always\n          filter: exit\n          keyname: time_change\n        - syscall: settimeofday\n          action: always\n          filter: exit\n          keyname: time_change\n        - action: always\n          filter: exit\n          filters:\n            - path=/bin/ping\n            - perm=x\n            - auid\u003e=500\n            - auid!=4294967295\n          keyname: privileged\n```\n\nThe machine needs to be prepared. In CI this is done using [`molecule/default/prepare.yml`](https://github.com/buluma/ansible-role-auditd/blob/master/molecule/default/prepare.yml):\n\n```yaml\n---\n- name: Prepare\n  hosts: all\n  become: true\n  gather_facts: false\n\n  roles:\n    - role: buluma.bootstrap\n```\n\nAlso see a [full explanation and example](https://buluma.github.io/how-to-use-these-roles.html) on how to use these roles.\n\n## [Role Variables](#role-variables)\n\nThe default values for the variables are set in [`defaults/main.yml`](https://github.com/buluma/ansible-role-auditd/blob/master/defaults/main.yml):\n\n```yaml\n---\n# defaults file for auditd\n\n# Below variables are docuemented in the man page for auditd.conf\n# https://linux.die.net/man/5/auditd.conf\nauditd_buffer_size: 32768\nauditd_fail_mode: 1\nauditd_maximum_rate: 60\nauditd_enable_flag: 1\nauditd_local_events: \"yes\"\nauditd_write_logs: \"yes\"\nauditd_log_file: /var/log/audit/audit.log\nauditd_log_group: root\nauditd_log_format: RAW\nauditd_flush: incremental_async\nauditd_freq: 50\nauditd_max_log_file: 8\nauditd_num_logs: 5\nauditd_priority_boost: 4\nauditd_disp_qos: lossy\nauditd_dispatcher: /sbin/audispd\nauditd_name_format: none\nauditd_max_log_file_action: rotate\nauditd_space_left: \"75\"  # This can be a number ('25') or a percentage. ('25%')\nauditd_space_left_action: syslog\nauditd_verify_email: \"yes\"\nauditd_action_mail_acct: root\nauditd_admin_space_left: 50\nauditd_admin_space_left_action: suspend\nauditd_disk_full_action: suspend\nauditd_disk_error_action: suspend\nauditd_use_libwrap: \"yes\"\nauditd_tcp_listen_queue: 5\nauditd_tcp_max_per_addr: 1\nauditd_tcp_client_max_idle: 0\nauditd_enable_krb5: \"no\"\nauditd_krb5_principal: auditd\nauditd_distribute_network: \"no\"\n\n# You can opt to manage the rules with this role or not.\n# Setting auditd_manage_rules to false will not manage the rules.\nauditd_manage_rules: true\n\n# Some rules require a specific architecture to be set.\nauditd_default_arch: b64\n\n\n# You can opt to start the auditd service or not.\n# Mostly useful in CI, to avoid starting the service.\nauditd_start_service: true\n```\n\n## [Requirements](#requirements)\n\n- pip packages listed in [requirements.txt](https://github.com/buluma/ansible-role-auditd/blob/master/requirements.txt).\n\n## [State of used roles](#state-of-used-roles)\n\nThe following roles are used to prepare a system. You can prepare your system in another way.\n\n| Requirement | GitHub | Version |\n|-------------|--------|--------|\n|[buluma.bootstrap](https://galaxy.ansible.com/buluma/bootstrap)|[![Ansible Molecule](https://github.com/buluma/ansible-role-bootstrap/actions/workflows/molecule.yml/badge.svg)](https://github.com/buluma/ansible-role-bootstrap/actions/workflows/molecule.yml)|[![Version](https://img.shields.io/github/release/buluma/ansible-role-bootstrap.svg)](https://github.com/shadowwalker/ansible-role-bootstrap)|\n\n## [Context](#context)\n\nThis role is a part of many compatible roles. Have a look at [the documentation of these roles](https://buluma.github.io/) for further information.\n\nHere is an overview of related roles:\n\n![dependencies](https://raw.githubusercontent.com/buluma/ansible-role-auditd/png/requirements.png \"Dependencies\")\n\n## [Compatibility](#compatibility)\n\nThis role has been tested on these [container images](https://hub.docker.com/u/buluma):\n\n|container|tags|\n|---------|----|\n|[EL](https://hub.docker.com/r/buluma/enterpriselinux)|8, 9|\n|[Debian](https://hub.docker.com/r/buluma/debian)|all|\n|[Fedora](https://hub.docker.com/r/buluma/fedora)|all|\n|[opensuse](https://hub.docker.com/r/buluma/opensuse)|all|\n|[Ubuntu](https://hub.docker.com/r/buluma/ubuntu)|all|\n\nThe minimum version of Ansible required is 2.12, tests have been done to:\n\n- The previous version.\n- The current version.\n- The development version.\n\nIf you find issues, please register them in [GitHub](https://github.com/buluma/ansible-role-auditd/issues)\n\n## [Changelog](#changelog)\n\n[Role History](https://github.com/buluma/ansible-role-auditd/blob/master/CHANGELOG.md)\n\n## [License](#license)\n\n[Apache-2.0](https://github.com/buluma/ansible-role-auditd/blob/master/LICENSE)\n\n## [Author Information](#author-information)\n\n[Shadow Walker](https://buluma.github.io/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuluma%2Fansible-role-auditd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuluma%2Fansible-role-auditd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuluma%2Fansible-role-auditd/lists"}