Skip to content
4 changes: 2 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
"filename": "playbooks/acs.yml",
"hashed_secret": "0ca8f28152882e5edb182fc3f7d4ae10a5b10dc5",
"is_verified": false,
"line_number": 506
"line_number": 509
}
],
"roles/activemq/molecule/default/tests/test_activemq.py": [
Expand Down Expand Up @@ -198,5 +198,5 @@
}
]
},
"generated_at": "2025-02-21T13:10:34Z"
"generated_at": "2025-02-21T18:40:09Z"
}
1 change: 0 additions & 1 deletion 7.3.N-extra-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@ api_explorer:
repository: "{{ nexus_repository.releases }}"
version: 7.3.0
dependencies_version:
postgresql_connector: 42.6.1
postgres_major_version: 14
1 change: 0 additions & 1 deletion 7.4.N-extra-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@ api_explorer:
repository: "{{ nexus_repository.releases }}"
version: 7.4.0
dependencies_version:
postgresql_connector: 42.6.1
postgres_major_version: 14
6 changes: 0 additions & 6 deletions group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,8 @@ use_custom_keystores: false
# common dependencies should be updated also in *-extra-vars.yml as well thanks
# to default ansible merging behaviour
dependencies_version:
postgresql_connector: 42.6.1
postgres_major_version: 15
temurin_arch: "{{ 'x64' if ansible_architecture == 'x86_64' else ansible_architecture }}"
dependencies_url:
postgresql_connector: >-
{{ maven_repository.org }}/postgresql/postgresql/{{ dependencies_version.postgresql_connector }}/postgresql-{{ dependencies_version.postgresql_connector }}.jar
postgresql_connector_sha1_checksum_url: >-
{{ maven_repository.org }}/postgresql/postgresql/{{ dependencies_version.postgresql_connector }}/postgresql-{{ dependencies_version.postgresql_connector }}.jar.sha1
repo_db_url: ""
repo_db_driver: org.postgresql.Driver
repo_db_name: "alfresco"
Expand Down
6 changes: 6 additions & 0 deletions playbooks/acs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@
raw_properties: "{{ properties_snippets }}"
repository_identity_url: "{{ identity_url | default('') }}"
tomcat_version: "{{ acs_play_tomcat_version }}"
repository_jdbc_driver_version: "{{ acs_play_repository_jdbc_driver_version }}"
repository_jdbc_driver_url: "{{ acs_play_repository_jdbc_driver_url }}"
repository_jdbc_driver_checksum: "{{ acs_play_repository_jdbc_driver_checksum }}"
post_tasks:
- name: Update installation status file with ACS
become: true
Expand Down Expand Up @@ -560,6 +563,9 @@
sync_zip_checksum: "{{ acs_play_sync_zip_sha1_checksum }}"
sync_zip_username: "{{ nexus_user }}"
sync_zip_password: "{{ nexus_password }}"
sync_jdbc_driver_version: "{{ acs_play_sync_jdbc_driver_version }}"
sync_jdbc_driver_url: "{{ acs_play_sync_jdbc_driver_url }}"
sync_jdbc_driver_checksum: "{{ acs_play_sync_jdbc_driver_checksum }}"
when: acs.edition == "Enterprise"
post_tasks:
- name: Update installation status file with Sync
Expand Down
5 changes: 5 additions & 0 deletions playbooks/group_vars/all.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
default_java_version: 17.0.14+7
acs_play_java_core: "{{ default_java_version.split('+')[0] }}"
default_jdbc_pg_driver_version: 42.7.3
default_jdbc_pg_driver_base_url: https://repo.maven.apache.org/maven2/org/postgresql/postgresql
default_jdbc_pg_driver_url: >-
{{ '{0}/{1}/postgresql-{1}.jar'.format(default_jdbc_pg_driver_base_url, default_jdbc_pg_driver_version) }}
default_jdbc_pg_driver_class: org.postgresql.Driver
5 changes: 5 additions & 0 deletions playbooks/group_vars/repository.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
acs_play_repository_jdbc_driver_class: "{{ default_jdbc_pg_driver_class }}"
acs_play_repository_jdbc_driver_version: "{{ acs_play_jdbc_pg_driver_version }}"
acs_play_repository_jdbc_driver_url: >-
{{ '{0}/{1}/postgresql-{1}.jar'.format(default_jdbc_pg_driver_base_url, acs_play_repository_jdbc_driver_version) }}
acs_play_repository_jdbc_driver_checksum: "sha1:{{ acs_play_repository_jdbc_driver_url }}.sha1"
5 changes: 5 additions & 0 deletions playbooks/group_vars/syncservice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ acs_play_sync_artifact_name: sync-dist-6.x
acs_play_sync_repository: "{{ nexus_repository.enterprise_releases }}/services/sync"
acs_play_sync_zip_url: "{{ acs_play_sync_repository }}/{{ acs_play_sync_artifact_name }}/{{ acs_play_sync_version }}/{{ acs_play_sync_artifact_name }}-{{ acs_play_sync_version }}.zip"
acs_play_sync_zip_sha1_checksum: "sha1:{{ acs_play_sync_zip_url }}.sha1"
acs_play_sync_jdbc_driver_class: "{{ default_jdbc_pg_driver_class }}"
acs_play_sync_jdbc_driver_version: "{{ acs_play_jdbc_pg_driver_version }}"
acs_play_sync_jdbc_driver_url: >-
{{ '{0}/{1}/postgresql-{1}.jar'.format(default_jdbc_pg_driver_base_url, acs_play_sync_jdbc_driver_version) }}
acs_play_sync_jdbc_driver_checksum: "sha1:{{ acs_play_sync_jdbc_driver_url }}.sha1"
7 changes: 7 additions & 0 deletions roles/repository/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,10 @@ repository_identity_url: ''
repository_identity_client_id: alfresco
repository_identity_client_secret: ''
repository_identity_realm: alfresco

repository_jdbc_driver_class: org.postgresql.Driver
repository_jdbc_driver_version: 42.7.3
repository_jdbc_driver_base_url: https://repo.maven.apache.org/maven2/org/postgresql/postgresql
repository_jdbc_driver_url: >-
{{ '{0}/{1}/postgresql-{1}.jar'.format(repository_jdbc_driver_base_url, repository_jdbc_driver_version) }}
repository_jdbc_driver_checksum: "sha1:{{ repository_jdbc_driver_url }}.sha1"
21 changes: 21 additions & 0 deletions roles/repository/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,24 @@ argument_specs:
default: alfresco
description: |
The realm to be used when contacting the identity service
repository_jdbc_pg_driver_version:
type: str
required: false
description: |
The version of the PostgreSQL JDBC driver to download
repository_jdbc_driver_class:
type: str
required: false
default: org.postgresql.Driver
description: |
The class name of the JDBC driver to use
repository_jdbc_driver_url:
type: str
required: false
description: |
The URL to download the JDBC driver from
repository_jdbc_driver_checksum:
type: str
required: false
description: |
The checksum of the JDBC driver with format <algorithm>:<checksum>
8 changes: 4 additions & 4 deletions roles/repository/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,14 @@
- name: Download postgresql jar
become: true
ansible.builtin.get_url:
url: "{{ dependencies_url.postgresql_connector }}"
checksum: sha1:{{ lookup('url', dependencies_url.postgresql_connector_sha1_checksum_url) }}
url: "{{ repository_jdbc_driver_url }}"
checksum: "{{ repository_jdbc_driver_checksum }}"
dest: "{{ tomcat_config_dir }}/lib/postgresql.jar"
mode: 'u=rw,g=r,o=r'
owner: "{{ username }}"
group: "{{ group_name }}"
register: postgresql_download
when: repo_db_url == ""
when: repository_jdbc_driver_class == 'org.postgresql.Driver'
async: 900
poll: 0
tags:
Expand Down Expand Up @@ -285,7 +285,7 @@
owner: "{{ username }}"
group: "{{ group_name }}"
mode: "0640"
when: repo_db_url != ""
when: repository_jdbc_driver_class != 'org.postgresql.Driver'

- name: Copy user provided license file
ansible.builtin.copy:
Expand Down
7 changes: 7 additions & 0 deletions roles/sync/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,10 @@ sync_environment:
jmx_config_remote_enabled: false
jmx_config_remote_port: 50800
jmx_config_remote_rmi_port: 50801

sync_jdbc_driver_class: org.postgresql.Driver
sync_jdbc_driver_version: 42.7.3
sync_jdbc_driver_base_url: https://repo.maven.apache.org/maven2/org/postgresql/postgresql
sync_jdbc_driver_url: >-
{{ '{0}/{1}/postgresql-{1}.jar'.format(sync_jdbc_driver_base_url, sync_jdbc_driver_version) }}
sync_jdbc_driver_checksum: "sha1:{{ sync_jdbc_driver_url }}.sha1"
21 changes: 21 additions & 0 deletions roles/sync/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,24 @@ argument_specs:
type: str
default: >-
https://artifacts.alfresco.com/nexus/content/groups/private/org/alfresco/services/sync/sync-dist-6.x/5.1.0/sync-dist-6.x-5.1.0.zip.sha1
sync_jdbc_pg_driver_version:
type: str
required: false
description: |
The version of the PostgreSQL JDBC driver to download
sync_jdbc_driver_class:
type: str
required: false
default: org.postgresql.Driver
description: |
The class name of the JDBC driver to use
sync_jdbc_driver_url:
type: str
required: false
description: |
The URL to download the JDBC driver from
sync_jdbc_driver_checksum:
type: str
required: false
description: |
The checksum of the JDBC driver with format <algorithm>:<checksum>
8 changes: 4 additions & 4 deletions roles/sync/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@

- name: Download postgresql JDBC driver
ansible.builtin.get_url:
url: "{{ dependencies_url.postgresql_connector }}"
checksum: sha1:{{ lookup('url', dependencies_url.postgresql_connector_sha1_checksum_url) }}
url: "{{ sync_jdbc_driver_url }}"
checksum: "{{ sync_jdbc_driver_checksum }}"
dest: "{{ sync_home }}/service-sync/connectors/postgresql.jar"
mode: "0644"
owner: "{{ username }}"
group: "{{ group_name }}"
when: not sync_db_url or sync_db_url is regex('jdbc:postgresql://')
when: sync_jdbc_driver_class == 'org.postgresql.Driver'

- name: Copy db_connector to {{ sync_home }}/service-sync/connectors folder
ansible.builtin.copy:
Expand All @@ -68,7 +68,7 @@
owner: "{{ username }}"
group: "{{ group_name }}"
mode: "0644"
when: sync_db_url and sync_db_url is not regex('jdbc:postgresql://')
when: sync_jdbc_driver_class != 'org.postgresql.Driver'

- name: Add paths to setenv file
ansible.builtin.blockinfile:
Expand Down
1 change: 1 addition & 0 deletions vars/acs23.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ acs_play_transformers_libreoffice_version: 7.2.5.1
acs_play_transformers_pdf_version: 1.1
acs_play_transformers_imagemagick_version: 7.1.0-16-ci-11
acs_play_transformers_aio_version: 5.1.6
acs_play_jdbc_pg_driver_version: "{{ default_jdbc_pg_driver_version }}"
1 change: 1 addition & 0 deletions vars/acs73.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ acs_play_transformers_libreoffice_version: 7.2.5.1
acs_play_transformers_pdf_version: 1.1
acs_play_transformers_imagemagick_version: 7.1.0-16-ci-11
acs_play_transformers_aio_version: 5.1.6
acs_play_jdbc_pg_driver_version: "{{ default_jdbc_pg_driver_version }}"
1 change: 1 addition & 0 deletions vars/acs74.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ acs_play_transformers_libreoffice_version: 7.2.5.1
acs_play_transformers_pdf_version: 1.1
acs_play_transformers_imagemagick_version: 7.1.0-16-ci-11
acs_play_transformers_aio_version: 5.1.6
acs_play_jdbc_pg_driver_version: "{{ default_jdbc_pg_driver_version }}"
Loading