mirror of
https://github.com/ZwareBear/JFrog-Cloud-Installers.git
synced 2026-01-21 00:06:55 -06:00
Ansible/Artifactory - Improve offline upgrades
Improve play to better handle nodes without internet access. By pinning tasks to occur when the tar is downloaded or unarchived it allows for more coverage of scenarios. Similarly, check to see if the jdbc driver provided as part of the tar is the version set in the variables. This allows for users to provide the tar in presteps to calling the role if they choose / need to. Zachary.Wayer@garmin.com
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
owner: "{{ artifactory_user }}"
|
||||
group: "{{ artifactory_group }}"
|
||||
creates: "{{ artifactory_untar_home }}"
|
||||
register: unarchived_artifactory
|
||||
when: (download_artifactory is succeeded) and (not ansible_check_mode)
|
||||
|
||||
- name: Stop artifactory
|
||||
@@ -44,12 +45,12 @@
|
||||
file:
|
||||
path: "{{ artifactory_home }}/app"
|
||||
state: absent
|
||||
when: download_artifactory.changed
|
||||
when: (download_artifactory.changed) or (unarchived_artifactory.changed)
|
||||
|
||||
- name: Copy new app to artifactory app
|
||||
become: yes
|
||||
command: "cp -r {{ artifactory_untar_home }}/app/. {{ artifactory_home }}/app"
|
||||
when: download_artifactory.changed
|
||||
when: (download_artifactory.changed) or (unarchived_artifactory.changed)
|
||||
notify: restart artifactory
|
||||
|
||||
- name: Configure artifactory license(s)
|
||||
@@ -63,6 +64,12 @@
|
||||
- artifactory_licenses | length > 0
|
||||
notify: restart artifactory
|
||||
|
||||
- name: Check if included database driver is the correct version
|
||||
become: yes
|
||||
stat:
|
||||
path: "{{ artifactory_home }}/app/artifactory/tomcat/lib/postgresql-{{ postgres_driver_version }}.jar"
|
||||
register: included_database_driver
|
||||
|
||||
- name: Check if jdbc driver exists
|
||||
become: yes
|
||||
stat:
|
||||
@@ -79,6 +86,7 @@
|
||||
when:
|
||||
- postgres_driver_download_url is defined
|
||||
- not database_driver.stat.exists
|
||||
- not included_database_driver.stat.exists
|
||||
notify: restart artifactory
|
||||
|
||||
- name: Configure installer info
|
||||
|
||||
Reference in New Issue
Block a user