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: Iae75d5fbaa3f8f74f69574b51dbae84948b8dcb6
(cherry picked from commit 4fbbb8096d)
This commit is contained in:
Rick Box 2017-05-10 11:54:32 +01:00
parent 8214ccfe17
commit d53c32af4d
1 changed files with 11 additions and 1 deletions

View File

@ -53,11 +53,21 @@
- cloudkitty-install
- cloudkitty-pip-packages
- name: Retrieve checksum for venv download
uri:
url: "{{ cloudkitty_venv_download_url | replace('tgz', 'checksum') }}"
return_content: yes
register: cloudkitty_venv_checksum
when: cloudkitty_venv_download | bool
tags:
- cloudkitty-install
- cloudkitty-pip-packages
- name: Attempt venv download
get_url:
url: "{{ cloudkitty_venv_download_url }}"
dest: "/var/cache/{{ cloudkitty_venv_download_url | basename }}"
checksum: "sha1:{{ lookup('url', cloudkitty_venv_download_url | replace('tgz', 'checksum')) }}"
checksum: "sha1:{{ cloudkitty_venv_checksum.content | trim }}"
register: cloudkitty_get_venv
when: cloudkitty_venv_download | bool
tags: