mirror of
https://github.com/de-it-krachten/ansible-role-lynis
synced 2026-05-14 11:51:46 +00:00
No description
- Jinja 100%
# [1.6.0](https://github.com/de-it-krachten/ansible-role-lynis/compare/v1.5.0...v1.6.0) (2026-03-15) ### Features * Added support for Fedora 43 ([ |
||
|---|---|---|
| .github/workflows | ||
| defaults | ||
| meta | ||
| molecule/default | ||
| tasks | ||
| templates | ||
| .ansible-lint | ||
| .cicd | ||
| .cicd.overwrite | ||
| .collections | ||
| .gitignore | ||
| .releaserc.yml | ||
| .roles | ||
| .yamllint | ||
| CHANGELOG.md | ||
| README.md | ||
ansible-role-lynis
Installs lynis om a variety of platforms https://cisofy.com
Dependencies
Roles
- deitkrachten.cron
Collections
None
Platforms
Supported platforms
- Red Hat Enterprise Linux 81
- Red Hat Enterprise Linux 91
- Red Hat Enterprise Linux 101
- RockyLinux 8
- RockyLinux 9
- RockyLinux 10
- OracleLinux 8
- OracleLinux 9
- OracleLinux 10
- AlmaLinux 8
- AlmaLinux 9
- AlmaLinux 10
- Debian 11 (Bullseye)
- Debian 12 (Bookworm)
- Debian 13 (Trixie)
- Ubuntu 20.04 LTS
- Ubuntu 22.04 LTS
- Ubuntu 24.04 LTS
- Fedora 42
- Fedora 43
Note: 1 : no automated testing is performed on these platforms
Role Variables
defaults/main.yml
# Lynis version to be installed
lynis_version: 'latest'
# Should lynis be executed
lynis_execute: false
# root directory where to install the software
lynis_root: /usr/local
# Github API & download urls
lynis_api: https://api.github.com/repos/CISOfy/lynis
lynis_repo: https://github.com/CISOfy/lynis
lynis_url: "{{ lynis_repo }}/archive/refs/tags/{{ lynis_version }}.tar.gz"
# Wrapper script
lynis_wrapper_script: /usr/local/bin/lynis.sh
# Execute lynis immediately
lynis_immediate: false
# Lynis schedule defaults
lynis_execution_user: root
lynis_execution_group: root
lynis_schedule: false
lynis_schedule_command: "{{ lynis_wrapper_script }}"
lynis_schedule_times:
weekday: '*'
hour: '02'
minute: '00'
# Location for centralized output
lynis_central_path: /var/log/lynis_central
# Lynix log file
lynis_log: "/var/log/lynis.log"
# Lynis html report
lynis_html: "/var/log/lynis.html"
Example Playbook
molecule/default/converge.yml
- name: sample playbook for role 'lynis'
hosts: all
become: 'yes'
vars:
molecule_driver: '{{ lookup(''env'', ''MOLECULE_DRIVER_NAME'') }}'
lynis_execute: true
tasks:
- name: Include role 'lynis'
ansible.builtin.include_role:
name: lynis