forked from ansible-lockdown/RHEL7-CIS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.yml
74 lines (64 loc) · 1.37 KB
/
main.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
# handlers file for RHEL7-CIS
- name: sysctl flush ipv4 route table
become: yes
sysctl:
name: net.ipv4.route.flush
value: 1
sysctl_set: yes
when: ansible_virtualization_type != "docker"
- name: sysctl flush ipv6 route table
become: yes
sysctl:
name: net.ipv6.route.flush
value: 1
sysctl_set: yes
when: ansible_virtualization_type != "docker"
- name: systemd restart tmp.mount
become: yes
systemd:
name: tmp.mount
daemon_reload: yes
enabled: yes
masked: no
state: reloaded
- name: systemd restart var-tmp.mount
become: yes
systemd:
name: var-tmp.mount
daemon_reload: yes
enabled: yes
masked: no
state: reloaded
- name: generate new grub config
become: yes
command: grub2-mkconfig -o "{{ grub_cfg.stat.lnk_source }}"
- name: restart firewalld
become: yes
service:
name: firewalld
state: restarted
- name: restart xinetd
become: yes
service:
name: xinetd
state: restarted
- name: restart sshd
become: yes
service:
name: sshd
state: restarted
- name: reload dconf
become: yes
command: dconf update
- name: restart auditd
command: /sbin/service auditd restart
changed_when: no
check_mode: no
failed_when: no
args:
warn: no
when:
- rhel7cis_skip_for_travis == false
tags:
- skip_ansible_lint