diff --git a/roles/product_install/tasks/main.yml b/roles/product_install/tasks/main.yml index d595495..6194164 100644 --- a/roles/product_install/tasks/main.yml +++ b/roles/product_install/tasks/main.yml @@ -76,16 +76,16 @@ - name: "Case: No cached version, or supplied is higher; use supplied" set_fact: atl_download_version: "{{ atl_product_version }}" - when: (not cached.stat.exists) or + when: (force_version_update is defined and force_version_update | bool) or + (not cached.stat.exists) or atl_product_version is version(atl_cached_version, '>') - name: "Case: Cached version is higher or forced, ignore supplied" set_fact: atl_download_version: "{{ atl_cached_version }}" - when: - - cached.stat.exists - - atl_product_version is version(atl_cached_version, '<=') - - (not force_version_update is defined or not force_version_update | bool) + when: cached.stat.exists and + atl_product_version is version(atl_cached_version, '<=') and + (not force_version_update is defined or not force_version_update | bool) when: not version_is_latest