forked from TrueCloudLab/certificates
Make the default provisioner name optional; change DNS names variable name
This commit is contained in:
parent
4e8e4c638e
commit
f738cb43c3
1 changed files with 4 additions and 8 deletions
|
@ -8,11 +8,7 @@ set -eo pipefail
|
||||||
export STEPPATH=$(step path)
|
export STEPPATH=$(step path)
|
||||||
|
|
||||||
# List of env vars required for step ca init
|
# List of env vars required for step ca init
|
||||||
declare -ra REQUIRED_INIT_VARS=(DOCKER_STEPCA_INIT_NAME DOCKER_STEPCA_INIT_DNS DOCKER_STEPCA_INIT_EMAIL)
|
declare -ra REQUIRED_INIT_VARS=(DOCKER_STEPCA_INIT_NAME DOCKER_STEPCA_INIT_DNS_NAMES)
|
||||||
|
|
||||||
# optional:
|
|
||||||
# DOCKER_STEPCA_INIT_PASSWORD (initial CA password)
|
|
||||||
# DOCKER_STEPCA_INIT_SSH (boolean: given a non-empty value, create an SSH CA)
|
|
||||||
|
|
||||||
# Ensure all env vars required to run step ca init are set.
|
# Ensure all env vars required to run step ca init are set.
|
||||||
function init_if_possible () {
|
function init_if_possible () {
|
||||||
|
@ -40,8 +36,8 @@ function generate_password () {
|
||||||
function step_ca_init () {
|
function step_ca_init () {
|
||||||
local -a setup_args=(
|
local -a setup_args=(
|
||||||
--name "${DOCKER_STEPCA_INIT_NAME}"
|
--name "${DOCKER_STEPCA_INIT_NAME}"
|
||||||
--dns "${DOCKER_STEPCA_INIT_DNS}"
|
--dns "${DOCKER_STEPCA_INIT_DNS_NAMES}"
|
||||||
--provisioner "${DOCKER_STEPCA_INIT_EMAIL}"
|
--provisioner "${DOCKER_STEPCA_INIT_PROVISIONER_NAME:-admin}"
|
||||||
--password-file "${STEPPATH}/password"
|
--password-file "${STEPPATH}/password"
|
||||||
--address ":9000"
|
--address ":9000"
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue