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: I240605a8cd76b6ee2dfebde8eb47d577c4f93c95
(cherry picked from commit 72d2de8437)
This commit is contained in:
Rick Box 2017-05-10 12:37:43 +01:00 committed by Jesse Pretorius (odyssey4me)
parent 896ca17fc0
commit 4ce1e4bb9a
1 changed files with 8 additions and 1 deletions

View File

@ -41,11 +41,18 @@
retries: 5
delay: 2
- name: Retrieve checksum for venv download
uri:
url: "{{ monasca_venv_download_url | replace('tgz', 'checksum') }}"
return_content: yes
register: monasca_venv_checksum
when: monasca_venv_download | bool
- name: Attempt venv download
get_url:
url: "{{ monasca_venv_download_url }}"
dest: "/var/cache/{{ monasca_venv_download_url | basename }}"
checksum: "sha1:{{ lookup('url', monasca_venv_download_url | replace('tgz', 'checksum')) }}"
checksum: "sha1:{{ monasca_venv_checksum.content | trim }}"
register: monasca_get_venv
when: monasca_venv_download | bool