DCD-224: Switch to using marketplace version feed, and add test for another corner-case.

This commit is contained in:
Steve Smith
2019-04-18 12:13:05 +10:00
parent b7f3fb5434
commit 7342b7f039
6 changed files with 87 additions and 6 deletions

View File

@@ -1,10 +1,13 @@
---
- name: Fetch and cache latest version when no override
get_url:
url: "{{ atl_product_latest_version_url }}"
dest: "{{ atl_product_version_cache }}"
force: false
block:
- name: Fetch the latest version from URL
set_fact:
atl_product_version_json: "{{ lookup('url', '{{ atl_product_latest_version_url }}') }}"
- name: Set the local var to fetched version
set_fact:
atl_product_version: "{{ atl_product_version_json.version }}"
when: atl_product_version is undefined or atl_product_version == "latest"
- name: Write override cached version when specified
@@ -12,7 +15,6 @@
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
command: "cat {{ atl_product_version_cache }}"