Files
dc-deployments-automation/roles/product_install/tasks/cached_version_fetch.yml
2019-05-09 08:37:52 +10:00

22 lines
539 B
YAML

---
- 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