-
I’ve reviewed the previous discussion on reusability (#272 ), and I would like to clarify something regarding the use of this repository for deploying and maintaining multiple PostgreSQL clusters in different environments . Specifically, my task involves managing multiple clusters (e.g.,
This approach gives the included variables the highest precedence (beside For example, if
This would make it easier to define and reuse specific variables per cluster and/or environment. Question: UPD.
Could someone provide an example of this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
yes, use extra-vars to define a directory with cluster-specific variables. Here is an example of one of the CI: ansible-playbook $PLAYBOOK \
--private-key ./ansible_ssh_key \
--inventory $CI_PROJECT_DIR/$ENV/inventory \
--extra-vars "@$CI_PROJECT_DIR/$ENV/vars/main.yml" \
--extra-vars "@$CI_PROJECT_DIR/$ENV/vars/Debian.yml" \
--extra-vars "@$CI_PROJECT_DIR/$ENV/vars/system.yml" \
--extra-vars "@$CI_PROJECT_DIR/$ENV/vars/update.yml" \
--extra-vars "@$CI_PROJECT_DIR/$ENV/vars/upgrade.yml" \
--extra-vars "@$CI_PROJECT_DIR/$ENV/vars/secrets.yml" \
--extra-vars "mask_password=true" \
--vault-password-file ./vault_pass \
--tags $TAG Details here: https://autobase.tech/docs/management/gitops#extended-ci-pipeline P.S. |
Beta Was this translation helpful? Give feedback.
yes, use extra-vars to define a directory with cluster-specific variables. Here is an example of one of the CI: