Skip to content

Commit

Permalink
Fix dependency-logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ferricoxide committed Mar 13, 2024
1 parent 95a3cb5 commit 13761c9
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions ash-linux/el8/STIGbyID/cat1/RHEL-08-010140.sls
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,17 @@ user_cfg_exists-{{ stig_id }}:
- name: '{{ grubPassFile }}'
- makedirs: True
- onlyif:
- [[ -d /sys/firmware/efi/ ]]
- [[ ! -e {{ grubPassFile }} ]]
- test -d /sys/firmware/efi/
- unless: {{ grubPassFile }}
user_cfg_content-{{ stig_id }}:
cmd.run:
- name: 'printf "GRUB2_PASSWORD={{ grubEncryptedPass }}" > {{ grubPassFile }}'
- cwd: /root
- require:
- onchanges:
- file: user_cfg_exists-{{ stig_id }}
- onchanges_in:
- regen_grubCfg-{{ stig_id }}
grubuser_superDef-{{ grubUserFile }}-{{ stig_id }}:
file.replace:
Expand All @@ -76,7 +78,7 @@ regen_grubCfg-{{ stig_id }}:
cmd.run:
- name: '/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg'
- cwd: /root
- require:
- file: grubuser_superDef-{{ grubUserFile }}-{{ stig_id }}
- file: grubuser_userSub-{{ grubUserFile }}-{{ stig_id }}
- onchanges:
- file: grubuser_superDef-{{ grubUserFile }}-{{ stig_id }}
- file: grubuser_userSub-{{ grubUserFile }}-{{ stig_id }}
{%- endif %}

0 comments on commit 13761c9

Please sign in to comment.