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

Win Skip For Test Name Update, Set system facts based on gather facts module default vars #76

Merged
merged 3 commits into from
Jul 25, 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
1 change: 1 addition & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ skip_list:
- 'name[casing]'
- 'name[template]'
- 'jinja[spacing]'
- 'yaml[line-length]'
- 'var-naming' # Older playbook no new release
- '204'
- '208'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,6 @@ resource "local_file" "inventory" {
ansible_winrm_read_timeout_sec: 180
# This section turns off and on the groups of controls for connections and tests.
# Refer to default main for the controls here explanation.
win19cis_skip_for_test: true
win_skip_for_test: true
EOF
}
8 changes: 4 additions & 4 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ min_ansible_version: "2.10.1"
# win19cis_rule_18_9_102_2_2
# win19cis_rule_18_9_102_2_3
# win19cis_rule_18_9_103_1
win19cis_skip_for_test: false
win_skip_for_test: false

# These variables correspond with the CIS rule IDs or paragraph numbers defined in
# the CIS benchmark documents.
Expand Down Expand Up @@ -121,7 +121,7 @@ win19cis_rule_2_3_1_2: true
win19cis_rule_2_3_1_3: true
win19cis_rule_2_3_1_4: true
# Setting win19cis_rule_2_3_1_5 Control To True Will Break Ansible Connection
# Setting win19cis_skip_for_test: true -- will skip the controls here even if they are set to true.
# Setting win_skip_for_test: true -- will skip the controls here even if they are set to true.
win19cis_rule_2_3_1_5: true
win19cis_rule_2_3_1_6: true
win19cis_rule_2_3_2_1: true
Expand Down Expand Up @@ -217,7 +217,7 @@ win19cis_rule_9_3_2: true
win19cis_rule_9_3_3: true
win19cis_rule_9_3_4: true
# Setting win19cis_rule_9_3_5 Control To True Will Break Ansible Connection
# Setting win19cis_skip_for_test: true -- will skip the controls here even if they are set to true.
# Setting win_skip_for_test: true -- will skip the controls here even if they are set to true.
win19cis_rule_9_3_5: true
win19cis_rule_9_3_6: true
win19cis_rule_9_3_7: true
Expand Down Expand Up @@ -449,7 +449,7 @@ win19cis_rule_18_9_100_1: true
win19cis_rule_18_9_100_2: true
# WINRM CONTROLS #
# Setting The Following Controls To True Will Break Ansible Connection
# Setting win19cis_skip_for_test: true -- will skip the controls here even if they are set to true.
# Setting win_skip_for_test: true -- will skip the controls here even if they are set to true.
# win19cis_rule_18_9_102_1_1
# win19cis_rule_18_9_102_1_2
# win19cis_rule_18_9_102_2_1
Expand Down
2 changes: 1 addition & 1 deletion tasks/section02.yml
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@
- "'adminchangethis' not in win19cis_admin_username"
when:
- win19cis_rule_2_3_1_5
- not win19cis_skip_for_test
- not win_skip_for_test
tags:
- level1-domaincontroller
- level1-memberserver
Expand Down
2 changes: 1 addition & 1 deletion tasks/section09.yml
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@
type: dword
when:
- win19cis_rule_9_3_5
- not win19cis_skip_for_test
- not win_skip_for_test
tags:
- level1-domaincontroller
- level1-memberserver
Expand Down
12 changes: 6 additions & 6 deletions tasks/section18.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3083,7 +3083,7 @@
type: dword
when:
- win19cis_rule_18_9_102_1_1
- not win19cis_skip_for_test
- not win_skip_for_test
tags:
- level1-domaincontroller
- level1-memberserver
Expand All @@ -3099,7 +3099,7 @@
type: dword
when:
- win19cis_rule_18_9_102_1_2
- not win19cis_skip_for_test
- not win_skip_for_test
tags:
- level1-domaincontroller
- level1-memberserver
Expand Down Expand Up @@ -3130,7 +3130,7 @@
type: dword
when:
- win19cis_rule_18_9_102_2_1
- not win19cis_skip_for_test
- not win_skip_for_test
tags:
- level1-domaincontroller
- level1-memberserver
Expand All @@ -3147,7 +3147,7 @@
type: dword
when:
- win19cis_rule_18_9_102_2_2
- not win19cis_skip_for_test
- not win_skip_for_test
tags:
- level2-domaincontroller
- level2-memberserver
Expand All @@ -3163,7 +3163,7 @@
type: dword
when:
- win19cis_rule_18_9_102_2_3
- not win19cis_skip_for_test
- not win_skip_for_test
tags:
- level1-domaincontroller
- level1-memberserver
Expand Down Expand Up @@ -3195,7 +3195,7 @@
type: dword
when:
- win19cis_rule_18_9_103_1
- not win19cis_skip_for_test
- not win_skip_for_test
tags:
- level2-domaincontroller
- level2-memberserver
Expand Down
8 changes: 8 additions & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@
warn_control_list: ""
warn_count: 0

# This sets the variable that is created for the banner.
lockdown_banner: "{{lookup('file', './templates/banner.txt')}}"

# This will be changed to true if discovered.
win19cis_cloud_based_system: false


# These are default values that will be changed when the prelim
# runs and finds the correct setting.
win2019cis_is_standalone: false
win2019cis_is_domain_controller: false
win2019cis_is_domain_member: false