From 2d087176610c712f51dec8722b6129e648b149e2 Mon Sep 17 00:00:00 2001 From: Rick Box Date: Wed, 10 May 2017 12:28:25 +0100 Subject: [PATCH] Fix for lookup and get_url occuring in different places We use an SSH bastion host which we do our deployment through. The deployment host doesn't have direct access to the same network as the host. As a result the venv local checksum lookup fails. I have described this here: https://bugs.launchpad.net/openstack-ansible/+bug/1689283 This is a simple fix for this problem, assuming everything is good it will need repeating in multiple places in the code base. Change-Id: I90285aa6e4246e5015f5d88e298705a550608931 (cherry picked from commit 68f72831627d15d1b96698ed7dcbd9e1ddf9636c) --- tasks/barbican_install.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tasks/barbican_install.yml b/tasks/barbican_install.yml index 0d20b36..367ea8d 100644 --- a/tasks/barbican_install.yml +++ b/tasks/barbican_install.yml @@ -45,11 +45,18 @@ retries: 5 delay: 2 +- name: Retrieve checksum for venv download + uri: + url: "{{ barbican_venv_download_url | replace('tgz', 'checksum') }}" + return_content: yes + register: barbican_venv_checksum + when: barbican_venv_download | bool + - name: Attempt venv download get_url: url: "{{ barbican_venv_download_url }}" dest: "/var/cache/{{ barbican_venv_download_url | basename }}" - checksum: "sha1:{{ lookup('url', barbican_venv_download_url | replace('tgz', 'checksum')) }}" + checksum: "sha1:{{ barbican_venv_checksum.content | trim }}" register: barbican_get_venv when: barbican_venv_download | bool