Skip to content

Commit

Permalink
Fix var-refs
Browse files Browse the repository at this point in the history
  • Loading branch information
ferricoxide committed Mar 13, 2024
1 parent 46872ac commit 95a3cb5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
9 changes: 5 additions & 4 deletions ash-linux/el8/STIGbyID/cat1/RHEL-08-010140.sls
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
#################################################################
{%- set stig_id = 'RHEL-08-010140' %}
{%- set helperLoc = tpldir ~ '/files' %}
{%- from tpldir ~ '/map.jinja' import grub2stuff with context %}
{%- from tpldir ~ '/grub2_info.jinja' import grubEncryptedPass with context %}
{%- from tpldir ~ '/grub2_info.jinja' import grubUser with context %}
{%- set skipIt = salt.pillar.get('ash-linux:lookup:skip-stigs', []) %}
{%- set mustSet = salt.pillar.get('ash-linux:lookup:grub-passwd', '') %}
{%- set grubUserFile = '/etc/grub.d/01_users' %}
Expand Down Expand Up @@ -54,7 +55,7 @@ user_cfg_exists-{{ stig_id }}:
user_cfg_content-{{ stig_id }}:
cmd.run:
- name: 'printf "GRUB2_PASSWORD=grub2stuff.grubEncryptedPass }}" > {{ grubPassFile }}'
- name: 'printf "GRUB2_PASSWORD={{ grubEncryptedPass }}" > {{ grubPassFile }}'
- cwd: /root
- require:
- file: user_cfg_exists-{{ stig_id }}
Expand All @@ -63,13 +64,13 @@ grubuser_superDef-{{ grubUserFile }}-{{ stig_id }}:
file.replace:
- name: '{{ grubUserFile }}'
- pattern: 'superusers=".*"'
- repl: 'superusers="{{ grub2stuff.grubUser }}"'
- repl: 'superusers="{{ grubUser }}"'
grubuser_userSub-{{ grubUserFile }}-{{ stig_id }}:
file.replace:
- name: '{{ grubUserFile }}'
- pattern: 'password_pbkdf2 .* \\'
- repl: 'password_pbkdf2 {{ grub2stuff.grubUser }} \\'
- repl: 'password_pbkdf2 {{ grubUser }} \\'
regen_grubCfg-{{ stig_id }}:
cmd.run:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{#- Initialize a map of default values #}
{%- load_yaml as defaults %}

{%- endload %}

{%- set grubUser = salt.pillar.get('ash-linux:lookup:grub-user', 'grubuser') %}
{%- set grubClearPass = salt.pillar.get('ash-linux:lookup:grub-passwd', 'AR34llyB4dP4ssw*rd') %}

Expand Down

0 comments on commit 95a3cb5

Please sign in to comment.