Georg Pfuetzenreuter
de9ac40e3f
All checks were successful
ci/lysergic/push/pipeline Pipeline was successful
Script is called in the Lysergic repository as well, where not all files exist. Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
15 lines
412 B
Bash
Executable File
15 lines
412 B
Bash
Executable File
#!/usr/bin/env sh
|
|
# This rewrites top-files to fetch roles from grains instead of our custom roles API. Useful for testing outside of the LibertaCasa infrastructure, but not recommended for production.
|
|
|
|
potential_files=(*/top.sls salt/common/suse.sls)
|
|
|
|
for file in ${potential_files[@]}
|
|
do
|
|
if [ -f "$file" ]
|
|
then
|
|
files+="$file "
|
|
fi
|
|
done
|
|
|
|
sed -i "s/salt\['http.query'\].*/grains\['roles'\] -%}/" ${files[@]}
|