diff --git a/ansible/roles/stack-sunbird/defaults/main.yml b/ansible/roles/stack-sunbird/defaults/main.yml index 7fbeb17d70..6e8c98fcbc 100644 --- a/ansible/roles/stack-sunbird/defaults/main.yml +++ b/ansible/roles/stack-sunbird/defaults/main.yml @@ -1070,3 +1070,4 @@ cloud_store_base_path_placeholder: "CLOUD_BASE_PATH" #Youtube Standard Licence Validation youtube_app_name: fetch-youtube-license youtube_api_key: "{{ lp_vault_youtube_api_key }}" +pgssl: "false" diff --git a/ansible/roles/stack-sunbird/templates/odk.env b/ansible/roles/stack-sunbird/templates/odk.env index 64ca86b1ec..5fcd16ddd4 100644 --- a/ansible/roles/stack-sunbird/templates/odk.env +++ b/ansible/roles/stack-sunbird/templates/odk.env @@ -1,7 +1,11 @@ -DB_URL=jdbc:postgresql://{{uci_postgres_host}}:5432/{{uci_odk_postgres_database}}?user={{uci_postgres_user}}&password={{uci_postgres_password}} DB_USERNAME={{uci_postgres_user}} DB_PASSWORD={{uci_postgres_password}} DB_SCHEMA=public DB_NAME={{uci_odk_postgres_database}} DB_PORT=5432 -AGGREGATE_HOST= \ No newline at end of file +AGGREGATE_HOST= +{% if pgssl == "true" %} +DB_URL=jdbc:postgresql://{{uci_postgres_host}}:5432/{{uci_odk_postgres_database}}?user={{uci_postgres_user}}&password={{uci_postgres_password}}&sslmode=require +{% else %} +DB_URL=jdbc:postgresql://{{uci_postgres_host}}:5432/{{uci_odk_postgres_database}}?user={{uci_postgres_user}}&password={{uci_postgres_password}} +{% endif %} \ No newline at end of file