File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed
Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change 44# This script validates that the machine matches the committed baseline
55# specifications using supascan (pre-installed via nix profile for ubuntu user).
66#
7- # Must be run as ubuntu user with sudo access (supascan calls sudo goss internally).
8- #
97# Usage: cis_baseline_check.sh [baselines-dir]
108
119set -euo pipefail
@@ -25,9 +23,8 @@ if [[ ! -d $BASELINES_DIR ]]; then
2523 exit 1
2624fi
2725
28- # Source nix environment (for ubuntu user's profile)
29- # shellcheck source=/dev/null
30- . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
26+ # Add ubuntu user's nix profile to PATH
27+ export PATH=" /home/ubuntu/.nix-profile/bin:$PATH "
3128
3229# Verify supascan is available
3330if ! command -v supascan & > /dev/null; then
Original file line number Diff line number Diff line change 222222
223223 - name : Run CIS baseline validation
224224 become : yes
225- become_user : ubuntu
226225 shell : |
227226 /bin/bash /tmp/ansible-playbook/ansible/files/cis_baseline_check.sh /tmp/ansible-playbook/audit-specs/baselines
228227 when : stage2_nix
You can’t perform that action at this time.
0 commit comments