forked from ansible-lockdown/RHEL9-CIS
updated
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
efdcb0b6f5
commit
f808f30173
24 changed files with 769 additions and 923 deletions
43
tasks/section_2/cis_2.1.x.yml
Normal file
43
tasks/section_2/cis_2.1.x.yml
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
---
|
||||
|
||||
- name: "2.1.1 | PATCH | Ensure time synchronization is in use"
|
||||
package:
|
||||
name: "{{ rhel8cis_time_synchronization }}"
|
||||
state: present
|
||||
when:
|
||||
- rhel8cis_rule_2_1_1
|
||||
- not rhel8cis_system_is_container
|
||||
tags:
|
||||
- level1-server
|
||||
- level1-workstation
|
||||
- automated
|
||||
- patch
|
||||
- rule_2.1.1
|
||||
|
||||
- name: "2.1.2 | PATCH | Ensure chrony is configured"
|
||||
block:
|
||||
- name: "2.1.2 | PATCH | Ensure chrony is configured | Set configuration"
|
||||
template:
|
||||
src: chrony.conf.j2
|
||||
dest: /etc/chrony.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
|
||||
- name: "2.1.2 | PATCH | Ensure chrony is configured | modify /etc/sysconfig/chronyd | 1"
|
||||
lineinfile:
|
||||
dest: /etc/sysconfig/chronyd
|
||||
regexp: "^(#)?OPTIONS"
|
||||
line: "OPTIONS=\"-u chrony\""
|
||||
state: present
|
||||
create: yes
|
||||
mode: 0644
|
||||
when:
|
||||
- rhel8cis_time_synchronization == "chrony"
|
||||
- rhel8cis_rule_2_1_2
|
||||
- not rhel8cis_system_is_container
|
||||
tags:
|
||||
- level1-server
|
||||
- level1-workstation
|
||||
- patch
|
||||
- rule_2.1.2
|
||||
Loading…
Add table
Add a link
Reference in a new issue