Skip to content

Commit

Permalink
Merge pull request #3 from ibuildthecloud/main
Browse files Browse the repository at this point in the history
Add option to explicitly start agent with no roles
  • Loading branch information
Oats87 authored May 5, 2021
2 parents 053e074 + 6e43290 commit 7ce8c79
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ fi
# - CATTLE_ROLE_CONTROLPLANE=false
# - CATTLE_ROLE_ETCD=false
# - CATTLE_ROLE_WORKER=false
# - CATTLE_ROLE_NONE=false
# - CATTLE_LABELS
# - CATTLE_TAINTS
#
Expand Down Expand Up @@ -133,6 +134,10 @@ setup_env() {
CATTLE_ROLE_WORKER=false
fi

if [ -z "${CATTLE_ROLE_NONE}" ]; then
CATTLE_ROLE_NONE=false
fi

if [ -z "${CATTLE_REMOTE_ENABLED}" ]; then
CATTLE_REMOTE_ENABLED=true
else
Expand Down Expand Up @@ -185,7 +190,7 @@ setup_env() {
if [ -z "${CATTLE_SERVER}" ]; then
fatal "\$CATTLE_SERVER was not set"
fi
if [ "${CATTLE_ROLE_CONTROLPLANE}" = "false" ] && [ "${CATTLE_ROLE_ETCD}" = "false" ] && [ "${CATTLE_ROLE_WORKER}" = "false" ]; then
if [ "${CATTLE_ROLE_CONTROLPLANE}" = "false" ] && [ "${CATTLE_ROLE_ETCD}" = "false" ] && [ "${CATTLE_ROLE_WORKER}" = "false" ] && [ "${CATTLE_ROLE_NONE}" = "false" ]; then
fatal "You must select at least one role."
fi
fi
Expand Down

0 comments on commit 7ce8c79

Please sign in to comment.