Set the variable default if OS does not define the python

This commit is contained in:
Radosław 2020-02-21 08:14:44 +01:00
parent aa4908ee1e
commit 30757cd80f
1 changed files with 1 additions and 1 deletions

View File

@ -1,6 +1,6 @@
---
# For Python 3, use python3-pip.
pip_package: "{{ 'python-pip' if ansible_python_interpreter.endswith('python2') else 'python3-pip' }}"
pip_package: "{{ 'python-pip' if (ansible_python_interpreter| default('python3')).endswith('python2') else 'python3-pip' }}"
pip_executable: "{{ 'pip3' if pip_package.startswith('python3') else 'pip' }}"
pip_install_packages: []