Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Specify defaults for pip_install_upper_constraints
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mattt416 committed Apr 3, 2018
1 parent f2e2d92 commit 5a99262
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tasks/install_offline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tasks/install_source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 (' ') }}
Expand All @@ -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 (' ') }}
Expand Down

0 comments on commit 5a99262

Please sign in to comment.