Files
dc-deployments-automation/roles/jira_config/templates/dbconfig.xml.j2
2023-08-07 08:46:12 +10:00

37 lines
2.1 KiB
Django/Jinja

<?xml version="1.0" encoding="UTF-8"?>
<jira-database-config>
<name>defaultDS</name>
<delegator-name>default</delegator-name>
<database-type>{{ atl_db_type }}</database-type>
<schema-name>public</schema-name>
<jdbc-datasource>
<url>{{ atl_jdbc_url }}</url>
<username>{{ atl_jdbc_user }}</username>
{% if atl_product_version.split(".")[:2] | join(".") is version('9.11', '>=') and atl_secretsmanager_aws_region is defined and atl_secretsmanager_aws_region != "" and atl_secretsmanager_aws_secret_id is defined and atl_secretsmanager_aws_secret_id != "" -%}
<atlassian-password-cipher-provider>com.atlassian.secrets.store.aws.AwsSecretsManagerStore</atlassian-password-cipher-provider>
<password>{"region": "{{ atl_secretsmanager_aws_region }}", "secretId": "{{ atl_secretsmanager_aws_secret_id }}"}</password>
{% else -%}
<password>{{ atl_jdbc_password | replace("&", "&amp;") }}</password>
{% endif -%}
<driver-class>{{ atl_db_driver }}</driver-class>
{% if 'postgres' in atl_db_type %}
<connection-properties>tcpKeepAlive={{ atl_db_keepalive }};socketTimeout={{ atl_db_sockettimeout }}</connection-properties>
{% endif %}
<pool-min-size>{{ atl_db_poolminsize }}</pool-min-size>
<pool-max-size>{{ atl_db_poolmaxsize }}</pool-max-size>
<pool-min-idle>{{ atl_db_minidle }}</pool-min-idle>
<pool-max-idle>{{ atl_db_maxidle }}</pool-max-idle>
<pool-max-wait>{{ atl_db_maxwaitmillis }}</pool-max-wait>
<validation-query>select 1</validation-query>
<time-between-eviction-runs-millis>{{ atl_db_timebetweenevictionrunsmillis }}</time-between-eviction-runs-millis>
<min-evictable-idle-time-millis>{{ atl_db_minevictableidletimemillis }}</min-evictable-idle-time-millis>
<pool-remove-abandoned>{{ atl_db_removeabandoned }}</pool-remove-abandoned>
<pool-remove-abandoned-timeout>{{ atl_db_removeabandonedtimeout }}</pool-remove-abandoned-timeout>
<pool-test-while-idle>{{ atl_db_testwhileidle }}</pool-test-while-idle>
<pool-test-on-borrow>{{ atl_db_testonborrow }}</pool-test-on-borrow>
</jdbc-datasource>
</jira-database-config>