Add support for Debian

This commit is contained in:
2024-07-13 18:12:23 +01:00
parent 038970aaea
commit 14f054dce9
8 changed files with 28 additions and 5 deletions

View File

@@ -1,2 +1,4 @@
---
cis_hide_proc: false
cis_hide_proc: false
cis_cron_service_name: crond

View File

@@ -3,7 +3,7 @@ allow_duplicates: false
galaxy_info:
role_name: cis
author: Andrew Williams
author: nikdoof
description: Configures a RHEL systems to CIS specs
license: MIT
@@ -13,6 +13,9 @@ galaxy_info:
- name: RedHat
versions:
- 8
- name: Debian
versions:
- bookworm
collections:
- ansible.posix

View File

@@ -2,7 +2,7 @@
- name: Install AIDE
ansible.builtin.package:
name: aide
state: installed
state: present
notify: init aide
- name: Install AIDE crontab
ansible.builtin.copy:

View File

@@ -1,4 +1,13 @@
---
- name: Install auditd
ansible.builtin.package:
name: auditd
state: present
- name: Start auditd
ansible.builtin.service:
name: auditd
state: started
enabled: true
- name: Copy main CIS benchmark ruleset
ansible.builtin.copy:
src: auditd/cis-hardening.rules

View File

@@ -1,7 +1,7 @@
---
- name: Enable crond
- name: Enable cron
ansible.builtin.service:
name: crond
name: "{{ cis_cron_service_name }}"
state: started
enabled: true
- name: Set cron file security

View File

@@ -1,4 +1,10 @@
---
- name: CIS - Get OS specific vars
include_vars: "{{ item }}"
with_first_found:
- "os/{{ ansible_os_family }}/{{ ansible_distribution_major_version }}.yaml"
- "os/{{ ansible_os_family }}.yaml"
- include_tasks: auditd.yaml
- include_tasks: limits.yaml
- include_tasks: proc.yaml

2
vars/os/Debian.yaml Normal file
View File

@@ -0,0 +1,2 @@
---
cis_cron_service_name: cron

1
vars/os/RedHat.yaml Normal file
View File

@@ -0,0 +1 @@
---