From 51b38916ad99f3ffbc1723a7d97f9034b4c02dc4 Mon Sep 17 00:00:00 2001 From: Rick Box Date: Wed, 10 May 2017 14:26:01 +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: I681491539aa4aa3b3c88ce059ae6d1f7e56f651d (cherry picked from commit ffdd1b3966ab07afd2a3f20a25bde626922ca3b3) --- tasks/trove_install.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tasks/trove_install.yml b/tasks/trove_install.yml index 53eebe8..67d092a 100644 --- a/tasks/trove_install.yml +++ b/tasks/trove_install.yml @@ -50,11 +50,18 @@ retries: 5 delay: 2 +- name: Retrieve checksum for venv download + uri: + url: "{{ trove_venv_download_url | replace('tgz', 'checksum') }}" + return_content: yes + register: trove_venv_checksum + when: trove_venv_download | bool + - name: Attempt venv download get_url: url: "{{ trove_venv_download_url }}" dest: "/var/cache/{{ trove_venv_download_url | basename }}" - checksum: "sha1:{{ lookup('url', trove_venv_download_url | replace('tgz', 'checksum')) }}" + checksum: "sha1:{{ trove_venv_checksum.content | trim }}" register: trove_get_venv when: trove_venv_download | bool