Skip to content

Commit

Permalink
Merge pull request #331 from BillSkiCO/devel
Browse files Browse the repository at this point in the history
Formatted task name fields to match playbook format
  • Loading branch information
uk-bolly authored Nov 9, 2023
2 parents 53f646b + 68be179 commit 40b09e0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tasks/section_1/cis_1.2.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
- patch
- rule_1.2.2

- name: "1.2.3| PATCH | Ensure gpgcheck is globally activated"
- name: "1.2.3 | PATCH | Ensure gpgcheck is globally activated"
block:
- name: "1.2.3 | AUDIT | Ensure gpgcheck is globally activated | Find repos"
ansible.builtin.find:
Expand Down
4 changes: 2 additions & 2 deletions tasks/section_3/cis_3.4.2.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,13 @@
failed_when: false
register: rhel8cis_3_4_2_8_inconnectionrule

- name: "3.4.2.8| AUDIT | Ensure nftables outbound and established connections are configured | Gather outbound connection rules"
- name: "3.4.2.8 | AUDIT | Ensure nftables outbound and established connections are configured | Gather outbound connection rules"
ansible.builtin.shell: nft list ruleset | awk '/hook output/,/}/' | grep -E 'ip protocol (tcp|udp|icmp) ct state'
changed_when: false
failed_when: false
register: rhel8cis_3_4_2_8_outconnectionrule

- name: "3.4.2.8| PATCH | Ensure nftables outbound and established connections are configured | Add input tcp established accept policy"
- name: "3.4.2.8 | PATCH | Ensure nftables outbound and established connections are configured | Add input tcp established accept policy"
ansible.builtin.shell: nft add rule inet "{{ rhel8cis_nft_tables_tablename }}" input ip protocol tcp ct state established accept
when: '"ip protocol tcp ct state established accept" not in rhel8cis_3_4_2_8_inconnectionrule.stdout'

Expand Down
2 changes: 1 addition & 1 deletion tasks/section_5/cis_5.6.1.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
- password
- rule_5.6.1.4

- name: "5.6.1.5 | PATCH | Ensure all users last password change date is in the past"
- name: "5.6.1.5 | PATCH | Ensure all users last password change date is in the past"
block:
- name: "5.6.1.5 | AUDIT | Ensure all users last password change date is in the past | Get current date in Unix Time"
ansible.builtin.shell: echo $(($(date --utc --date "$1" +%s)/86400))
Expand Down
4 changes: 2 additions & 2 deletions tasks/section_6/cis_6.2.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
- groups
- rule_6.2.2

- name: "6.2.3 | AUDIT Ensure no duplicate UIDs exist"
- name: "6.2.3 | AUDIT | Ensure no duplicate UIDs exist"
block:
- name: "6.2.3 | AUDIT | Ensure no duplicate UIDs exist | Check for duplicate UIDs"
ansible.builtin.shell: "pwck -r | awk -F: '{if ($3 in uid) print $1 ; else uid[$3]}' /etc/passwd"
Expand Down Expand Up @@ -134,7 +134,7 @@
- users
- rule_6.2.5

- name: "6.2.6 | AUDIT |Ensure no duplicate group names exist"
- name: "6.2.6 | AUDIT | Ensure no duplicate group names exist"
block:
- name: "6.2.6 | AUDIT | Ensure no duplicate group names exist | Check for duplicate group names"
ansible.builtin.shell: 'getent passwd | cut -d: -f1 | sort -n | uniq -d'
Expand Down

0 comments on commit 40b09e0

Please sign in to comment.