Skip to content

Commit

Permalink
adds feature to allow rsync install CIS compliant
Browse files Browse the repository at this point in the history
Signed-off-by: Dan D <[email protected]>
  • Loading branch information
dderemiah committed Oct 19, 2023
1 parent eded340 commit 6b9bf5a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ ubtu22cis_smb_server: false
ubtu22cis_squid_server: false
ubtu22cis_snmp_server: false
ubtu22cis_rsync_server: false
ubtu22cis_rsync_masked: false
ubtu22cis_nis_server: false
ubtu22cis_nfs_client: false

Expand Down
32 changes: 23 additions & 9 deletions tasks/section_2/cis_2.2.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -326,15 +326,29 @@
- rule_2.2.15
- postfix

- name: "2.2.16 | PATCH | Ensure rsync service is not installed"
ansible.builtin.package:
name: rsync
state: absent
notify: Purge_packages
when:
- ubtu22cis_rule_2_2_16
- not ubtu22cis_rsync_server
- "'rsync' in ansible_facts.packages"
- name: "2.2.16 | PATCH | Ensure rsync service is not installed or masked"
block:
- name: "2.2.16 | PATCH | Ensure rsync service is disabled and masked"
ansible.builtin.service:
name: rsync.service
state: stopped
enabled: false
masked: true
when:
- ubtu22cis_rule_2_2_16
- ubtu22cis_rsync_masked
- not ubtu22cis_rsync_server
- "'rsync' in ansible_facts.packages"
- name: "2.2.16 | PATCH | Ensure rsync service is not installed"
ansible.builtin.package:
name: rsync
state: absent
notify: Purge_packages
when:
- ubtu22cis_rule_2_2_16
- not ubtu22cis_rsync_masked
- not ubtu22cis_rsync_server
- "'rsync' in ansible_facts.packages"
tags:
- level1-server
- level1-workstation
Expand Down

0 comments on commit 6b9bf5a

Please sign in to comment.