Skip to content

Question: How to Use the Repository for Managing Multiple Clusters Across Multiple Environments? #869

Closed Answered by vitabaks
chobostar asked this question in Q&A
Discussion options

You must be logged in to vote

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 ./v…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by chobostar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants