From 7103d2bc5919e818077004adbfe358d4ce9efdb4 Mon Sep 17 00:00:00 2001 From: Rick Box Date: Wed, 10 May 2017 14:31:38 +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: I5b1ac355370365a7895033e772b418b8c1db8f3f --- tasks/zaqar_install.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tasks/zaqar_install.yml b/tasks/zaqar_install.yml index 1ee7df4..aa3cdd4 100644 --- a/tasks/zaqar_install.yml +++ b/tasks/zaqar_install.yml @@ -48,11 +48,21 @@ - zaqar-install - zaqar-pip-packages +- name: Retrieve checksum for venv download + uri: + url: "{{ zaqar_venv_download_url | replace('tgz', 'checksum') }}" + return_content: yes + register: zaqar_venv_checksum + when: zaqar_venv_download | bool + tags: + - zaqar-install + - zaqar-pip-packages + - name: Attempt venv download get_url: url: "{{ zaqar_venv_download_url }}" dest: "/var/cache/{{ zaqar_venv_download_url | basename }}" - checksum: "sha1:{{ lookup('url', zaqar_venv_download_url | replace('tgz', 'checksum')) }}" + checksum: "sha1:{{ zaqar_venv_checksum.content | trim }}" register: zaqar_get_venv when: zaqar_venv_download | bool tags: