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

Final v1r7 release #28

Merged
merged 4 commits into from
Mar 12, 2024
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
119 changes: 0 additions & 119 deletions .config/.secrets.baseline

This file was deleted.

6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
*.retry
.cache
.vagrant
vagrantfile
Vagrantfile
tests/*redhat-subscription
tests/Dockerfile
*.iso
*.box
packer_cache
delete*
ignore*
test_inv
# temp remove doc while this is built up
doc/
# VSCode
.vscode

Expand Down Expand Up @@ -45,4 +46,3 @@ benchparse/

# GitHub Action/Workflow files
.github/
.DS_Store
2 changes: 0 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,11 @@ repos:
rev: v1.4.0
hooks:
- id: detect-secrets
args: [ '--baseline', '.config/.secrets.baseline' ]

- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.2
hooks:
- id: gitleaks
args: ['--baseline-path', '.config/.gitleaks-report.json']

- repo: https://github.com/ansible-community/ansible-lint
rev: v24.2.0
Expand Down
8 changes: 7 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Based on Stig v1r7 - Jan 2023

- ansible version updated to 2.10.1 minimum
- updates to pre-commit config
- gitignore updated

## Release 0.9.1

- yamllint update
Expand All @@ -15,7 +21,7 @@ Issues
- thanks to @kfiresmith
- #11
- #12
- thanks to €aelx-rowe
- thanks to @alex-rowe
- #13

## Release 0.9.0
Expand Down
2 changes: 1 addition & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ galaxy_info:
license: MIT
role_name: ubuntu20_stig
namespace: mindpointgroup
min_ansible_version: 2.9.0
min_ansible_version: 2.10.1
platforms:
- name: Ubuntu
versions:
Expand Down
3 changes: 2 additions & 1 deletion site.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---

- hosts: all # noqa: name[play]
- name: Run Ubuntu20-stig remediation role
hosts: all
become: true

roles:
Expand Down
17 changes: 12 additions & 5 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
---

- name: Gather distribution info
ansible.builtin.setup:
gather_subset: distribution,!all,!min
when:
- ansible_distribution is not defined
- name: Check OS version and family
ansible.builtin.assert:
that: ansible_distribution == 'Ubuntu' and ansible_distribution_major_version is version_compare('20', '==')
msg: "This role can only be run against Ubuntu 20. {{ ansible_distribution }} {{ ansible_distribution_major_version }} is not supported."
tags:
- always

- name: Check ansible version
ansible.builtin.assert:
that: ansible_version.full is version_compare(min_ansible_version, '>=')
fail_msg: "You must use Ansible {{ min_ansible_version }} or greater"
success_msg: "This role is running a supported version of ansible {{ ansible_version.full }} >= {{ min_ansible_version }}"
tags:
- always

Expand Down
2 changes: 1 addition & 1 deletion tasks/parse_etc_passwd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
vars:
ld_passwd_regex: >-
^(?P<id>[^:]*):(?P<password>[^:]*):(?P<uid>[^:]*):(?P<gid>[^:]*):(?P<gecos>[^:]*):(?P<dir>[^:]*):(?P<shell>[^:]*)
ld_passwd_yaml: |
ld_passwd_yaml: | # pragma: allowlist secret
id: >-4
\g<id>
password: >-4
Expand Down
1 change: 1 addition & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---

# vars file for .
min_ansible_version: 2.10.1

# Used to control warning summary
warn_control_list: ""
Expand Down