Simple Ansible playbooks for detecting and adjusting TWGCB policies on RHEL 8.
At the present, this project only support the following TWGCB rules. The other rules will be added in the future.
- (TWG-CB-01-008-0245) Firewalld Configruation
- Check if firewalld is enabled or not.
- (TWG-CB-01-008-0277) Disabled SSH Root Login
- Check if sshd
PermitRootLogin
is disabled or not.
- Check if sshd
Start detection.
$ ansible-playbook -i hosts.ini check_env.yml
Fix the environment.
# For all managed nodes
$ ansible-playbook -i hosts.ini fix_env.yml
# For the specific nodes
$ ansible-playbook -i hosts.ini fix_env.yml --limit 192.168.0.1
The detection result will be converted to HTML format and exported to results_path
. (Default:/tmp/twgcb
).
$ ls /tmp/twgcb
results.html