@@ -25,35 +25,21 @@ function install_nix() {
2525
2626
2727function execute_stage2_playbook {
28+ echo " POSTGRES_MAJOR_VERSION: ${POSTGRES_MAJOR_VERSION} "
29+ echo " GIT_SHA: ${GIT_SHA} "
2830 sudo tee /etc/ansible/ansible.cfg << EOF
2931[defaults]
3032callbacks_enabled = timer, profile_tasks, profile_roles
3133EOF
3234 sed -i ' s/- hosts: all/- hosts: localhost/' /tmp/ansible-playbook/ansible/playbook.yml
3335
34- # Set psql_version and postgresql_version based on POSTGRES_MAJOR_VERSION
35- case " ${POSTGRES_MAJOR_VERSION} " in
36- " 15" )
37- psql_version=" psql_15"
38- postgresql_version=" postgresql15"
39- ;;
40- " 16" )
41- psql_version=" psql_16"
42- postgresql_version=" postgresql16"
43- ;;
44- * )
45- echo " Error: Unsupported POSTGRES_MAJOR_VERSION: ${POSTGRES_MAJOR_VERSION} "
46- exit 1
47- ;;
48- esac
49-
5036 # Run Ansible playbook
5137 export ANSIBLE_LOG_PATH=/tmp/ansible.log && export ANSIBLE_REMOTE_TEMP=/tmp
5238 ansible-playbook /tmp/ansible-playbook/ansible/playbook.yml \
5339 --extra-vars ' {"nixpkg_mode": false, "stage2_nix": true, "debpkg_mode": false}' \
5440 --extra-vars " git_commit_sha=${GIT_SHA} " \
55- --extra-vars " psql_version=${psql_version }" \
56- --extra-vars " postgresql_version=${postgresql_version }" \
41+ --extra-vars " psql_version=psql_ ${POSTGRES_MAJOR_VERSION }" \
42+ --extra-vars " postgresql_version=postgresql_ ${POSTGRES_MAJOR_VERSION }" \
5743 --extra-vars " nix_secret_key=${NIX_SECRET_KEY} " \
5844 --extra-vars " postgresql_major_version=${POSTGRES_MAJOR_VERSION} " \
5945 $ARGS
0 commit comments