mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 00:43:06 -06:00
DCD-224: Rename product_download to tgz_download in prep for an alternative installer.
This commit is contained in:
21
roles/tgz_download/tasks/cached_version_fetch.yml
Normal file
21
roles/tgz_download/tasks/cached_version_fetch.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
|
||||
- name: Check for existing version cache file
|
||||
stat:
|
||||
path: "{{ atl_product_version_cache }}"
|
||||
register: cached
|
||||
|
||||
# Case: File exists, always use its value
|
||||
- name: Use version for product version
|
||||
block:
|
||||
|
||||
- name: Read cached version from file
|
||||
command: "cat {{ atl_product_version_cache }}"
|
||||
register: atl_product_version_file
|
||||
changed_when: false
|
||||
|
||||
- name: Set the local var to cached version
|
||||
set_fact:
|
||||
atl_product_version: "{{ atl_product_version_file.stdout }}"
|
||||
|
||||
when: cached.stat.exists
|
||||
Reference in New Issue
Block a user