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: I418138e4edb8a74ea42a2e8a2c1e69bded6323ea
This commit is contained in:
Rick Box 2017-05-08 12:17:26 +01:00 committed by Jesse Pretorius
parent 69af8fb579
commit a8c05c8785

View File

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