DCD-484: Add ability to install from the tarball rather than the installer.

This commit is contained in:
Steve Smith
2019-07-11 12:42:28 +10:00
parent 26d2e4cbd4
commit 94a16a6731
8 changed files with 127 additions and 17 deletions

View File

@@ -137,22 +137,8 @@
mode: 0755
force: false
- name: Create installer varfile
template:
src: "{{ atl_product_family }}.varfile.j2"
dest: "{{ atl_product_varfile }}"
mode: 0755
# NOTE: We run the installer as the user rather than root to limit its
# actions. For example, if root and the 'jira' user exists then it
# will create 'jira1'; this potentially creates idempotency/upgrade
# issues down the line.
- name: Run the installer
command: /bin/sh "{{ atl_product_download }}" -q -varfile "{{ atl_product_varfile }}"
args:
creates: "{{ atl_product_installation_versioned }}/.install4j/"
become: true
become_user: "{{ atl_product_user }}"
- name: Unpack the downloaded application depending on format
include_tasks: "unpack_{{ atl_download_format }}.yml"
- name: Symlink the installed version to current
file:

View File

@@ -0,0 +1,18 @@
---
- name: Create installer varfile
template:
src: "{{ atl_product_family }}.varfile.j2"
dest: "{{ atl_product_varfile }}"
mode: 0755
# NOTE: We run the installer as the user rather than root to limit its
# actions. For example, if root and the 'jira' user exists then it
# will create 'jira1'; this potentially creates idempotency/upgrade
# issues down the line.
- name: Run the installer
command: /bin/sh "{{ atl_product_download }}" -q -varfile "{{ atl_product_varfile }}"
args:
creates: "{{ atl_product_installation_versioned }}/.install4j/"
become: true
become_user: "{{ atl_product_user }}"

View File

@@ -0,0 +1,15 @@
---
- name: Unpack the product packages
unarchive:
remote_src: true
src: "{{ atl_product_download }}"
dest: "{{ atl_product_installation_versioned }}"
owner: "{{ atl_product_user }}"
group: "{{ atl_product_user }}"
mode: 0755
# Strip off the lead product/version specific directory to normaise naming
extra_opts:
- "--strip-components=1"
# NOTE: Currently all products contain a `README.txt`, so use that as an 'unpacked' marker.
creates: "{{ atl_product_installation_versioned }}/README.txt"