-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardening.yml
36 lines (32 loc) · 868 Bytes
/
hardening.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
- name: System Hardening
remote_user: ansible
become: true
hosts: "{{ hostlist }},!docker,!containers,!raspberry"
tasks:
- block:
- name: Apply CIS hardening for EL8
import_role:
name: Ansible-RHEL8-CIS-Benchmarks
tags:
- hardening
- cis
when: ansible_distribution_major_version == '8'
- name: Apply CIS hardening for EL7
import_role:
name: Ansible-RHEL7-CIS-Benchmarks
tags:
- hardening
- cis
when: ansible_distribution_major_version == '7'
when: ansible_distribution == 'RedHat' or ansible_distribution == 'CentOS'
- name: Extra System Hardening
remote_user: ansible
become: true
hosts: "{{ hostlist }},!docker,!containers"
tasks:
- name: Apply additional hardening
import_role:
name: ansible-role-extra-hardening
tags:
- hardening