salt/bin/nbroles_to_grains.sh
Georg Pfuetzenreuter 97db5ef6db
Add nbroles_to_grains script + add note
Script allows for testing and pipeline minions to work without access to
the roles API. Additionally added a note about this in prepare_minion.py.

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
2023-01-21 18:54:58 +01:00

5 lines
269 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.
sed -i "s/salt\['nbroles.get'\](id)/grains\['roles'\]/" */top.sls