Skip to content

Commit

Permalink
Merge pull request #4 from Oats87/no-roles-flag
Browse files Browse the repository at this point in the history
Add --no-roles flag and ensure all other roles are set to false if --…
  • Loading branch information
Oats87 authored May 5, 2021
2 parents 7ce8c79 + 5eb9ee4 commit 8cafa67
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ parse_args() {
CATTLE_ROLE_WORKER=true
shift 1
;;
"--no-roles")
info "Role requested: none"
CATTLE_ROLE_NONE=true
shift 1
;;
"--label")
info "Label: $2"
if [ -n "${CATTLE_LABELS}" ]; then
Expand Down Expand Up @@ -138,6 +143,13 @@ setup_env() {
CATTLE_ROLE_NONE=false
fi

if [ "${CATTLE_ROLE_NONE}" = "true" ]; then
info "--no-roles flag passed, unsetting all other requested roles"
CATTLE_ROLE_CONTROLPLANE=false
CATTLE_ROLE_ETCD=false
CATTLE_ROLE_WORKER=false
fi

if [ -z "${CATTLE_REMOTE_ENABLED}" ]; then
CATTLE_REMOTE_ENABLED=true
else
Expand Down

0 comments on commit 8cafa67

Please sign in to comment.