Skip to content

Instantly share code, notes, and snippets.

@calebwashburn
Created December 6, 2019 20:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save calebwashburn/83c343e634152ef056afd8309a46137d to your computer and use it in GitHub Desktop.
Save calebwashburn/83c343e634152ef056afd8309a46137d to your computer and use it in GitHub Desktop.
# The inputs, outputs, params, filename, and filepath
# of this task file are part of its semantically versioned API.
# See our documentation for a detailed discussion of our semver API.
# See www.semver.org for an explanation of semantic versioning.
# code_snippet configure-director start yaml
---
platform: linux
inputs:
- name: platform-automation-tasks
- name: config # contains the director configuration file
- name: env # contains the env file with target OpsMan Information
- name: vars # variable files to be made available
optional: true
- name: secrets
# secret files to be made available
# separate from vars, so they can be store securely
optional: true
- name: ops-files # operations files to custom configure the product
optional: true
params:
VARS_FILES:
# - Optional
# - Filepath to the Ops Manager vars yaml file
# - The path is relative to root of the task build,
# so `vars` and `secrets` can be used.
OPS_FILES:
# - Optional
# - Filepath to the Ops Manager operations yaml files
# - The path is relative to root of the task build
ENV_FILE: env.yml
# - Required
# - Filepath of the env config YAML
# - The path is relative to root of the `env` input
DIRECTOR_CONFIG_FILE: director.yml
# - Required
# - Filepath to the director configuration yaml file
# - The path is relative to the root of the `config` input
run:
path: bash
args:
- "-c"
- |
vars_files_args=("")
for vf in ${VARS_FILES}
do
vars_files_args+=("--vars-file ${vf}")
done
ops_files_args=("")
for of in ${OPS_FILES}
do
ops_files_args+=("--ops-file ${of}")
done
# ${vars_files_args[@] needs to be globbed to pass through properly
# ${ops_files_args[@] needs to be globbed to pass through properly
# shellcheck disable=SC2068
om --env env/"${ENV_FILE}" configure-director --ignore-verifier-warnings \
--config "config/${DIRECTOR_CONFIG_FILE}" \
${vars_files_args[@]} \
${ops_files_args[@]}
# code_snippet configure-director end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment