From 369c807b90e0be7b604c3e336811ac5decf9ead8 Mon Sep 17 00:00:00 2001 From: Jonathan Rosser Date: Wed, 17 Feb 2021 13:30:17 +0000 Subject: [PATCH] Move lxc cache facts setting to where those facts are used. If we build a local chroot then the lxc_cache_prestage.yml tasks are no longer required, but the cache facts are still used later in the role. Move the settings of the facts closer to where the facts are used. Change-Id: Ie0bcf56f0ac12f5a5472f539824221f2d8f3c769 --- tasks/lxc_cache.yml | 5 +++++ tasks/lxc_cache_prestage.yml | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tasks/lxc_cache.yml b/tasks/lxc_cache.yml index 8145ceb1..6f7015b8 100644 --- a/tasks/lxc_cache.yml +++ b/tasks/lxc_cache.yml @@ -13,6 +13,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +- name: Set LXC cache fact(s) + set_fact: + cache_path_fact: "{{ lxc_container_cache_path }}/{{ lxc_cache_map.distro }}/{{ lxc_cache_map.release }}/{{ lxc_cache_map.arch }}/{{ lxc_cache_default_variant }}" + cache_time: "{{ ansible_date_time.epoch }}" + - name: Retrieve the expiry object slurp: src: "{{ cache_path_fact }}/expiry" diff --git a/tasks/lxc_cache_prestage.yml b/tasks/lxc_cache_prestage.yml index e6247dfd..5ceb69b2 100644 --- a/tasks/lxc_cache_prestage.yml +++ b/tasks/lxc_cache_prestage.yml @@ -13,11 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Set LXC cache fact(s) - set_fact: - cache_path_fact: "{{ lxc_container_cache_path }}/{{ lxc_cache_map.distro }}/{{ lxc_cache_map.release }}/{{ lxc_cache_map.arch }}/{{ lxc_cache_default_variant }}" - cache_time: "{{ ansible_date_time.epoch }}" - - name: Legacy image url fetch block: - name: Create legacy image URL fetch