Rename pip_packages_tmp variable

The py_pkgs lookup plugin looks for any variables containing
'pip_packages' to find names of Python packages to build.
https://github.com/openstack/openstack-ansible-plugins/blob/master/lookup/py_pkgs.py#L57

Integrated OSA gate testing is currently failing since each character
within '/tmp/pip_install/' is being considered as a package name.

Rename the 'pip_packages_tmp' variable to 'pip_tmp_packages' to avoid it
being evaluated by py_pkgs.

Change-Id: I4d0f40dbb254571b9871d407962627393083d618
This commit is contained in:
Jimmy McCrory 2016-06-20 18:24:42 -07:00
parent 9dfd08fd29
commit afb88cbf2e
3 changed files with 14 additions and 9 deletions

View File

@ -21,7 +21,7 @@ pip_fallback_url: https://raw.githubusercontent.com/pypa/get-pip/master/get-pip.
# and copy it to the remote container for installation. Useful for environments
# where the containers lack internet access.
pip_offline_install: false
pip_packages_tmp: /tmp/pip_install
pip_tmp_packages: /tmp/pip_install
# Additional options that you might want to pass to "get-pip.py" when installing pip.
# Default `pip_get_pip_options` is an empty string.

View File

@ -0,0 +1,5 @@
---
fixes:
- The ``pip_packages_tmp`` variable has been renamed
``pip_tmp_packages`` to avoid unintended processing
by the py_pkgs lookup plugin.

View File

@ -51,14 +51,14 @@
- name: Create local pip package cache
local_action:
module: file
path: "{{ pip_packages_tmp }}"
path: "{{ pip_tmp_packages }}"
state: directory
run_once: yes
tags:
- pip-install-local
- name: pip cache install files locally
local_action: shell python /tmp/get-pip.py -d '{{ pip_packages_tmp | quote }}' {{ pip_get_pip_options }} {{ pip_packages | map('quote') | join (' ') }}
local_action: shell python /tmp/get-pip.py -d '{{ pip_tmp_packages | quote }}' {{ pip_get_pip_options }} {{ pip_packages | map('quote') | join (' ') }}
register: pip_local_cache
until: pip_local_cache | success
retries: 3
@ -74,14 +74,14 @@
- name: Distribute PIP install files
copy:
src: "{{ pip_packages_tmp }}/"
dest: "{{ pip_packages_tmp }}"
src: "{{ pip_tmp_packages }}/"
dest: "{{ pip_tmp_packages }}"
tags:
- pip-install-cache-distribute
- pip-install
- name: Install PIP
shell: "python /opt/get-pip.py --no-index --find-links={{ pip_packages_tmp | quote }} {{ pip_get_pip_options }} {{ pip_packages | map('quote') | join (' ') }}"
shell: "python /opt/get-pip.py --no-index --find-links={{ pip_tmp_packages | quote }} {{ pip_get_pip_options }} {{ pip_packages | map('quote') | join (' ') }}"
ignore_errors: true
register: pip_install
until: pip_install | success
@ -89,7 +89,7 @@
delay: 2
- name: Install PIP (fall back mode)
shell: "python /opt/get-pip.py --isolated --no-index --find-links={{ pip_packages_tmp | quote }} {{ pip_get_pip_options }} {{ pip_packages | map('quote') | join (' ') }}"
shell: "python /opt/get-pip.py --isolated --no-index --find-links={{ pip_tmp_packages | quote }} {{ pip_get_pip_options }} {{ pip_packages | map('quote') | join (' ') }}"
when: pip_install.rc != 0
register: pip_install_fall_back
until: pip_install_fall_back | success
@ -108,7 +108,7 @@
- name: Clean up local install cache
local_action:
module: file
path: "{{ pip_packages_tmp }}"
path: "{{ pip_tmp_packages }}"
state: absent
run_once: yes
tags:
@ -116,7 +116,7 @@
- name: Clean up remote install files
file:
path: "{{ pip_packages_tmp }}"
path: "{{ pip_tmp_packages }}"
state: absent
tags:
- pip-install-cleanup