Skip to content

Commit

Permalink
Merge pull request #97 from ansible-lockdown/os_skip
Browse files Browse the repository at this point in the history
ability to skip supported os check
  • Loading branch information
georgenalen authored Mar 8, 2022
2 parents 91d384f + 9c41450 commit 6f529da
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ Refer to [RHEL8-STIG-Audit](https://github.com/ansible-lockdown/RHEL8-STIG-Audit

## Requirements

RHEL/Rocky/AlmaLinux 8 - Other versions are not supported.
Access to download or add the goss binary and content to the system if using auditing. options are available on how to get the content to the system.
- RHEL/Rocky/AlmaLinux 8 - Other versions are not supported.
- Other OSs can be checked by changing the skip_os_check to true for testing purposes.
- Access to download or add the goss binary and content to the system if using auditing. options are available on how to get the content to the system.

### General

Expand Down
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ benchmark: RHEL8-STIG
# Whether to skip the reboot
rhel8cis_skip_reboot: true

# Whether to skip the OS check for supported OS's
skip_os_check: false

rhel8stig_cat1_patch: true
rhel8stig_cat2_patch: true
rhel8stig_cat3_patch: true
Expand Down
2 changes: 2 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
that: (ansible_distribution != 'CentOS' and ansible_os_family == 'RedHat' or ansible_os_family == "Rocky") and ansible_distribution_major_version is version_compare('8', '==')
fail_msg: "This role can only be run against RHEL/Rocky 8. {{ ansible_distribution }} {{ ansible_distribution_major_version }} is not supported."
success_msg: "This role is running against a supported OS {{ ansible_distribution }} {{ ansible_distribution_major_version }}"
when:
- not skip_os_check
tags:
- always

Expand Down

0 comments on commit 6f529da

Please sign in to comment.