From e01a2aecca76a19aac8d28adf574bac8f498142d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Mon, 4 Dec 2017 09:35:40 +0000 Subject: [PATCH] Fix SUSE gate overrides outside gates When storing the nodepool information task into suse mirror, the resulting variable could be storing ansible information, not only stdout. That could lead to malformed urls for the variable, when the check is skipped outside gates. See the value of a repo, containing ``opensuse_mirror`` here: "{'skipped': True, 'skip_reason': 'Conditional result was False', 'changed': False}/distribution/leap/42.3/repo/oss/" Change-Id: Idfd3c233c2239b642154960b536abe1f7fca7942 --- common-tasks/test-set-nodepool-vars.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common-tasks/test-set-nodepool-vars.yml b/common-tasks/test-set-nodepool-vars.yml index 93da9473..c8e8bb05 100644 --- a/common-tasks/test-set-nodepool-vars.yml +++ b/common-tasks/test-set-nodepool-vars.yml @@ -87,7 +87,7 @@ echo "${NODEPOOL_OPENSUSE_MIRROR}" args: executable: /bin/bash - register: opensuse_mirror + register: _opensuse_mirror delegate_to: localhost when: - ansible_pkg_mgr == 'zypper' @@ -97,7 +97,7 @@ - name: Set a fact to override the openSUSE mirror URL when in nodepool set_fact: - opensuse_mirror: "{{ opensuse_mirror.stdout }}" + opensuse_mirror: "{{ _opensuse_mirror.stdout }}" # OpenStack infra doesn't mirror OBS repos so use the upstream one opensuse_mirror_obs: "http://download.opensuse.org" when: