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>
This commit is contained in:
parent
8c72e7c63a
commit
97db5ef6db
4
bin/nbroles_to_grains.sh
Executable file
4
bin/nbroles_to_grains.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/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
|
@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# Prepares a minion for local testing of Salt code in this repository. Requires roles to be written as grains, as development and pipeline containers generally do not have access to our roles API. Consider nbroles_to_grains.sh first if this is the case.
|
||||
|
||||
import roles
|
||||
import os
|
||||
|
Loading…
Reference in New Issue
Block a user