chore!: separated galaxy deps and own collections; modified ansible script generation to use two paths for collections
REQUIRES REGENERATING ansible.cfg!
This commit is contained in:
parent
4af69c31ce
commit
888590ed9f
188 changed files with 30 additions and 30 deletions
|
@ -27,7 +27,7 @@ The following environment variables are supported for overrides:
|
|||
TMPL_INVENTORY_FILE: path where the main inventory file is located (current: "$TMPL_INVENTORY_FILE")
|
||||
TMPL_CONNECTION_TIMEOUT: default connection timeout when connecting to hosts (current: $TMPL_CONNECTION_TIMEOUT)
|
||||
TMPL_PLAYBOOK_DIR: path where the playbooks are located (current: "$TMPL_PLAYBOOK_DIR")
|
||||
TMPL_COLLECTIONS_PATH: path where the collections (custom and galaxy) are located (current: "$TMPL_COLLECTIONS_PATH")
|
||||
TMPL_COLLECTIONS_PATH: path where the collections (custom and galaxy) are located (current: "$TMPL_COLLECTIONS_PATH_CLEARED")
|
||||
EOF
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,14 @@ TMPL_PROJECT_ROOT=$(realpath "${TMPL_PROJECT_ROOT:-"${SCRIPT_DIR}/.."}")
|
|||
TMPL_INVENTORY_FILE=$(realpath "${TMPL_INVENTORY_FILE:-"${TMPL_PROJECT_ROOT}/inventory/inventory.yml"}")
|
||||
TMPL_CONNECTION_TIMEOUT=${TMPL_CONNECTION_TIMEOUT:-30}
|
||||
TMPL_PLAYBOOK_DIR=$(realpath "${TMPL_PLAYBOOK_DIR:-"${TMPL_PROJECT_ROOT}/playbooks"}")
|
||||
TMPL_COLLECTIONS_PATH=$(realpath "${TMPL_COLLECTIONS_PATH:-"${TMPL_PROJECT_ROOT}/collections/ansible_collections"}")
|
||||
TMPL_COLLECTIONS_PATH="${TMPL_COLLECTIONS_PATH:-"${TMPL_PROJECT_ROOT}/galaxy:${TMPL_PROJECT_ROOT}"}"
|
||||
TMPL_COLLECTIONS_PATH_CLEARED=
|
||||
for item in ${TMPL_COLLECTIONS_PATH//:/ }; do
|
||||
if [ -n "${TMPL_COLLECTIONS_PATH_CLEARED}" ]; then
|
||||
TMPL_COLLECTIONS_PATH_CLEARED+=":"
|
||||
fi
|
||||
TMPL_COLLECTIONS_PATH_CLEARED+=$(realpath "${item}")
|
||||
done
|
||||
|
||||
OPTS=ho
|
||||
LONGOPTS=help,overwrite
|
||||
|
@ -92,7 +99,7 @@ error_on_undefined_vars = True
|
|||
force_handlers = True
|
||||
home = ${TMPL_PROJECT_ROOT}
|
||||
inventory = ${TMPL_INVENTORY_FILE}
|
||||
collections_path = ${TMPL_COLLECTIONS_PATH}
|
||||
collections_path = ${TMPL_COLLECTIONS_PATH_CLEARED}
|
||||
local_tmp = /tmp
|
||||
nocolor = 0
|
||||
nocows = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue