generate-env: Use <<-EOF to indent the heredoc

Indentation is helpful to know a function's scope. Not indenting the
heredoc makes scanning harder.

Signed-off-by: Manuel Mendez <mmendez@equinix.com>
This commit is contained in:
Manuel Mendez 2021-04-27 17:45:16 +00:00
parent 0fff3e6d7f
commit 8e5430bfd1

View File

@ -53,44 +53,45 @@ generate_env() (
tink_password=$(generate_password) tink_password=$(generate_password)
local registry_password local registry_password
registry_password=$(generate_password) registry_password=$(generate_password)
cat <<EOF
# Tinkerbell Stack version
export OSIE_DOWNLOAD_LINK=${OSIE_DOWNLOAD_LINK} cat <<-EOF
export TINKERBELL_TINK_SERVER_IMAGE=${TINKERBELL_TINK_SERVER_IMAGE} # Tinkerbell Stack version
export TINKERBELL_TINK_CLI_IMAGE=${TINKERBELL_TINK_CLI_IMAGE}
export TINKERBELL_TINK_BOOTS_IMAGE=${TINKERBELL_TINK_BOOTS_IMAGE}
export TINKERBELL_TINK_HEGEL_IMAGE=${TINKERBELL_TINK_HEGEL_IMAGE}
export TINKERBELL_TINK_WORKER_IMAGE=${TINKERBELL_TINK_WORKER_IMAGE}
# Network interface for Tinkerbell's network export OSIE_DOWNLOAD_LINK=${OSIE_DOWNLOAD_LINK}
export TINKERBELL_NETWORK_INTERFACE="$tink_interface" export TINKERBELL_TINK_SERVER_IMAGE=${TINKERBELL_TINK_SERVER_IMAGE}
export TINKERBELL_TINK_CLI_IMAGE=${TINKERBELL_TINK_CLI_IMAGE}
export TINKERBELL_TINK_BOOTS_IMAGE=${TINKERBELL_TINK_BOOTS_IMAGE}
export TINKERBELL_TINK_HEGEL_IMAGE=${TINKERBELL_TINK_HEGEL_IMAGE}
export TINKERBELL_TINK_WORKER_IMAGE=${TINKERBELL_TINK_WORKER_IMAGE}
# Decide on a subnet for provisioning. Tinkerbell should "own" this # Network interface for Tinkerbell's network
# network space. Its subnet should be just large enough to be able export TINKERBELL_NETWORK_INTERFACE="$tink_interface"
# to provision your hardware.
export TINKERBELL_CIDR=29
# Host IP is used by provisioner to expose different services such as # Decide on a subnet for provisioning. Tinkerbell should "own" this
# tink, boots, etc. # network space. Its subnet should be just large enough to be able
# # to provision your hardware.
# The host IP should the first IP in the range, and the Nginx IP export TINKERBELL_CIDR=29
# should be the second address.
export TINKERBELL_HOST_IP=192.168.1.1
# Tink server username and password # Host IP is used by provisioner to expose different services such as
export TINKERBELL_TINK_USERNAME=admin # tink, boots, etc.
export TINKERBELL_TINK_PASSWORD="$tink_password" #
# The host IP should the first IP in the range, and the Nginx IP
# should be the second address.
export TINKERBELL_HOST_IP=192.168.1.1
# Docker Registry's username and password # Tink server username and password
export TINKERBELL_REGISTRY_USERNAME=admin export TINKERBELL_TINK_USERNAME=admin
export TINKERBELL_REGISTRY_PASSWORD="$registry_password" export TINKERBELL_TINK_PASSWORD="$tink_password"
# Legacy options, to be deleted: # Docker Registry's username and password
export FACILITY=onprem export TINKERBELL_REGISTRY_USERNAME=admin
export ROLLBAR_TOKEN=ignored export TINKERBELL_REGISTRY_PASSWORD="$registry_password"
export ROLLBAR_DISABLE=1
EOF # Legacy options, to be deleted:
export FACILITY=onprem
export ROLLBAR_TOKEN=ignored
export ROLLBAR_DISABLE=1
EOF
) )
main() ( main() (