From b9a3ea9fdfbe68bf424ea61fc4d0323781d6c348 Mon Sep 17 00:00:00 2001 From: Eesaan Atluri <atlurie@uab.edu> Date: Mon, 4 Nov 2024 17:43:36 -0600 Subject: [PATCH] feat: Add --extra-vars option defined by variable This will allow you to define the variables during runtime whose values you may want to override. In this case, we want to override the DNS config related to nameserver and search domain --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 107b611..bcacba9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -152,7 +152,7 @@ deploy_http_proxy_node: git clone ${CI_REPOSITORY_URL} /tmp/${CI_PROJECT_NAME} cd /tmp/${CI_PROJECT_NAME} git checkout ${CI_COMMIT_REF_NAME} - ansible-playbook -c local -i 127.0.0.1, ansible/cheaha.yml | tee -a /tmp/ansible.log + ansible-playbook -c local -i 127.0.0.1, --extra-vars="$EXTRA_VARS" ansible/cheaha.yml | tee -a /tmp/ansible.log rm -rf /tmp/${CI_PROJECT_NAME} EOF - > @@ -200,7 +200,7 @@ deploy_ssh_proxy_node: git clone ${CI_REPOSITORY_URL} /tmp/${CI_PROJECT_NAME} cd /tmp/${CI_PROJECT_NAME} git checkout ${CI_COMMIT_REF_NAME} - ansible-playbook -c local -i 127.0.0.1, ansible/cheaha.yml | tee -a /tmp/ansible.log + ansible-playbook -c local -i 127.0.0.1, --extra-vars="$EXTRA_VARS" ansible/cheaha.yml | tee -a /tmp/ansible.log rm -rf /tmp/${CI_PROJECT_NAME} EOF - > -- GitLab