mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Fix test for key in global.sls
This commit is contained in:
@@ -36,7 +36,7 @@ while [[ $try_count -le 6 ]]; do
|
|||||||
}"
|
}"
|
||||||
|
|
||||||
# Search for the needed keys in the global pillar file, if missing then add them
|
# Search for the needed keys in the global pillar file, if missing then add them
|
||||||
if (sed -z '/playbook:\n api_key:.*/Q' $local_salt_dir/pillar/global.sls); then
|
if (grep -Pzq 'playbook:\n api_key:.*' $local_salt_dir/pillar/global.sls); then
|
||||||
sed -iz "s/playbook:\n api_key:.*/playbook:\n api_key: ${automation_api_key}/" $local_salt_dir/pillar/global.sls
|
sed -iz "s/playbook:\n api_key:.*/playbook:\n api_key: ${automation_api_key}/" $local_salt_dir/pillar/global.sls
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user