diff --git a/configure/Makefile b/configure/Makefile index 413f3d6..0b74c4a 100644 --- a/configure/Makefile +++ b/configure/Makefile @@ -216,7 +216,7 @@ deploy-int-webapp-prod: check-web-zip-path check-vault-pwd-file deploy-avni-server-staging: check-app-zip-path check-vault-pwd-file APPLICATION_ZIP_PATH=$(app_zip_path) APPLICATION_ZIP_FILE_NAME=avni-server-0.0.1-SNAPSHOT.jar ansible-playbook deploy_app_to_servers.yml -i inventory/staging --vault-password-file ${VAULT_PASSWORD_FILE} \ - --extra-vars '{"java_apt_package":"openjdk-21-jdk","deploy_app_name":"avni","deploy_app_hosts":"avniservers","deploy_app_remote_user":"avni-server-user","deploy_app_env":"staging","deploy_app_role":"avni_appserver","deploy_app_env_vars_file":"group_vars/staging_vars.yml","deploy_app_env_secret_vars_file":"group_vars/staging-secret-vars.yml.enc"}' + --extra-vars '{"install_jdk":"true","java_apt_package":"openjdk-21-jdk","deploy_app_name":"avni","deploy_app_hosts":"avniservers","deploy_app_remote_user":"avni-server-user","deploy_app_env":"staging","deploy_app_role":"avni_appserver","deploy_app_env_vars_file":"group_vars/staging_vars.yml","deploy_app_env_secret_vars_file":"group_vars/staging-secret-vars.yml.enc"}' deploy-avni-server-prod: check-app-zip-path check-vault-pwd-file APPLICATION_ZIP_PATH=$(app_zip_path) APPLICATION_ZIP_FILE_NAME=avni-server-0.0.1-SNAPSHOT.jar ansible-playbook deploy_app_to_servers.yml -i inventory/prod --vault-password-file ${VAULT_PASSWORD_FILE} \ diff --git a/configure/deploy_app_to_servers.yml b/configure/deploy_app_to_servers.yml index 38cc58b..832b4da 100644 --- a/configure/deploy_app_to_servers.yml +++ b/configure/deploy_app_to_servers.yml @@ -7,11 +7,11 @@ remote_user: "{{ deploy_app_remote_user }}" vars: update_apt_cache: yes - install_jdk: false vars_files: - group_vars/basic_vars.yml - "{{ deploy_app_env_vars_file }}" - "{{ deploy_app_env_secret_vars_file }}" roles: - - jdk + - role: jdk + when: install_jdk - "{{ deploy_app_role }}" \ No newline at end of file diff --git a/configure/group_vars/basic_vars.yml b/configure/group_vars/basic_vars.yml index 9237893..8375e4d 100644 --- a/configure/group_vars/basic_vars.yml +++ b/configure/group_vars/basic_vars.yml @@ -4,8 +4,6 @@ project_name: avni letsencrypt_email: avni@samanvayfoundation.org avni_cache_dir: /var/cache/avni -install_jdk: true - ## Integration server variables int_appserver_application_name: avni-int-service int_appserver_port: 6013 diff --git a/configure/roles/jdk/tasks/main.yml b/configure/roles/jdk/tasks/main.yml index eaf47ac..9c5a988 100644 --- a/configure/roles/jdk/tasks/main.yml +++ b/configure/roles/jdk/tasks/main.yml @@ -1,8 +1,6 @@ --- - name: Pre-install Java JDK include_tasks: java_pre.yml - when: install_jdk - name: Install Java JDK - include_tasks: java_install.yml - when: install_jdk + include_tasks: java_install.yml \ No newline at end of file