DCD-224: Handle version override and reading any existing cached version

This commit is contained in:
Steve Smith
2019-04-15 11:35:41 +10:00
parent 624edfa5c9
commit 6e596bef55
9 changed files with 43 additions and 11 deletions

View File

@@ -1,9 +1,20 @@
---
- name: Fetch the latest version if necessary
- name: Fetch and cache latest version when no override
get_url:
url: "{{ atl_product_latest_version_url }}"
dest: "{{ atl_product_version_cache }}"
force: false
when: atl_product_version is undefined or atl_product_version == "latest"
- name: Write override cached version when specified
template:
src: version.j2
dest: "{{ atl_product_version_cache }}"
force: false
when: atl_product_version is defined and atl_product_version != "latest"
- name: Use version for product version
slurp:
src: "{{ atl_product_version_cache }}"
register: atl_product_version