Specify defaults for pip_install_upper_constraints

If this role is run without having pip_install_upper_constraints set
then you'll get a failure stating that pip_install_upper_constraints is
undefined.

This patch simply adds the default filter when referencing
pip_install_upper_constraints, which seems to be the pattern used in
openstack-ansible's utility-install.yml playbook.

Change-Id: If1b68fb21e0eb8f2f8c33a6bec952c2972e3e5e3
This commit is contained in:
Matt Thompson 2018-04-03 14:56:50 -04:00
parent f2e2d921a5
commit 5a99262155
2 changed files with 3 additions and 3 deletions

View File

@ -68,7 +68,7 @@
command python /tmp/get-pip.py
-d '{{ pip_tmp_packages | quote }}'
{{ (pip_install_upper_constraints is defined) |
ternary('--constraint ' ~ pip_install_upper_constraints, '') }}
ternary('--constraint ' ~ pip_install_upper_constraints | default(''), '') }}
{{ pip_get_pip_options }}
{{ pip_packages | map('quote') | join (' ') }}
changed_when: pip_local_cache.stdout.find('Successfully downloaded') != -1

View File

@ -17,7 +17,7 @@
- name: Install PIP
command: >
python /opt/get-pip.py {{ (pip_install_upper_constraints is defined) |
ternary('--constraint ' ~ pip_install_upper_constraints, '') }}
ternary('--constraint ' ~ pip_install_upper_constraints | default(''), '') }}
{{ pip_source_install_options }}
{{ pip_get_pip_options }}
{{ pip_packages | map('quote') | join (' ') }}
@ -32,7 +32,7 @@
command: >
python /opt/get-pip.py --isolated
{{ (pip_install_upper_constraints is defined) |
ternary('--constraint ' ~ pip_install_upper_constraints, '') }}
ternary('--constraint ' ~ pip_install_upper_constraints | default(''), '') }}
{{ pip_source_install_options }}
{{ pip_get_pip_options }}
{{ pip_packages | map('quote') | join (' ') }}