Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds feature to allow rsync install CIS compliant #105

Merged
merged 1 commit into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ ubtu20cis_dovecot_server: false
ubtu20cis_smb_server: false
ubtu20cis_squid_server: false
ubtu20cis_snmp_server: false
ubtu20cis_rsync_server: false
ubtu20cis_rsync_server: mask # Can be set to true, mask or remove depending on requirements
ubtu20cis_nis_server: false
ubtu20cis_nfs_client: false
# rpcbind is required by nfs-common which is required on client and server
Expand Down
25 changes: 19 additions & 6 deletions tasks/section_2/cis_2.2.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -328,13 +328,26 @@
- rule_2.2.16
- postfix

- name: "2.2.17 | PATCH | Ensure rsync service is not installed"
ansible.builtin.package:
name: rsync
state: absent
- name: "2.2.17 | PATCH | Ensure rsync service is either not installed or masked"
block:
- name: "2.2.17 | PATCH | Ensure rsync service is either not installed or masked | remove pkg"
ansible.builtin.package:
name: rsync
state: absent
when:
- ubtu20cis_rule_2_2_17
- ubtu20cis_rsync_server == 'remove'

- name: "2.2.17 | PATCH | Ensure rsync service is either not installed or masked | mask service"
ansible.builtin.service:
name: rsync.service
state: stopped
enabled: false
masked: true
when:
- ubtu20cis_rule_2_2_17
- ubtu20cis_rsync_server == 'mask'
when:
- ubtu20cis_rule_2_2_17
- not ubtu20cis_rsync_server
- "'rsync' in ansible_facts.packages"
tags:
- level1-server
Expand Down