incorporate features pillar

This commit is contained in:
Jason Ertel
2023-07-06 13:24:45 -04:00
parent d6db94a4d4
commit 5eca1acbeb
3 changed files with 15 additions and 5 deletions

View File

@@ -301,6 +301,17 @@ lookup_role() {
echo ${pieces[1]}
}
is_feature_enabled() {
feature=$1
enabled=$(lookup_salt_value features)
for cur in $enabled; do
if [[ "$feature" == "$cur" ]]; then
return 0
fi
done
return 1
}
require_manager() {
if is_manager_node; then
echo "This is a manager, so we can proceed."