mirror of
https://github.com/nikdoof/ansible-cis.git
synced 2025-12-17 11:59:23 +00:00
Add support for Debian
This commit is contained in:
@@ -1,2 +1,4 @@
|
|||||||
---
|
---
|
||||||
cis_hide_proc: false
|
cis_hide_proc: false
|
||||||
|
|
||||||
|
cis_cron_service_name: crond
|
||||||
@@ -3,7 +3,7 @@ allow_duplicates: false
|
|||||||
|
|
||||||
galaxy_info:
|
galaxy_info:
|
||||||
role_name: cis
|
role_name: cis
|
||||||
author: Andrew Williams
|
author: nikdoof
|
||||||
description: Configures a RHEL systems to CIS specs
|
description: Configures a RHEL systems to CIS specs
|
||||||
license: MIT
|
license: MIT
|
||||||
|
|
||||||
@@ -13,6 +13,9 @@ galaxy_info:
|
|||||||
- name: RedHat
|
- name: RedHat
|
||||||
versions:
|
versions:
|
||||||
- 8
|
- 8
|
||||||
|
- name: Debian
|
||||||
|
versions:
|
||||||
|
- bookworm
|
||||||
|
|
||||||
collections:
|
collections:
|
||||||
- ansible.posix
|
- ansible.posix
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
- name: Install AIDE
|
- name: Install AIDE
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: aide
|
name: aide
|
||||||
state: installed
|
state: present
|
||||||
notify: init aide
|
notify: init aide
|
||||||
- name: Install AIDE crontab
|
- name: Install AIDE crontab
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
|
|||||||
@@ -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
|
- name: Copy main CIS benchmark ruleset
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: auditd/cis-hardening.rules
|
src: auditd/cis-hardening.rules
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: Enable crond
|
- name: Enable cron
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
name: crond
|
name: "{{ cis_cron_service_name }}"
|
||||||
state: started
|
state: started
|
||||||
enabled: true
|
enabled: true
|
||||||
- name: Set cron file security
|
- name: Set cron file security
|
||||||
|
|||||||
@@ -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: auditd.yaml
|
||||||
- include_tasks: limits.yaml
|
- include_tasks: limits.yaml
|
||||||
- include_tasks: proc.yaml
|
- include_tasks: proc.yaml
|
||||||
|
|||||||
2
vars/os/Debian.yaml
Normal file
2
vars/os/Debian.yaml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
cis_cron_service_name: cron
|
||||||
1
vars/os/RedHat.yaml
Normal file
1
vars/os/RedHat.yaml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
---
|
||||||
Reference in New Issue
Block a user