]> git.phdru.name Git - ansible.git/blobdiff - playbooks/roles/python-packages/tasks/main.yml
Fix(python-packages): Install `python-pip`
[ansible.git] / playbooks / roles / python-packages / tasks / main.yml
index 52381d3a244d0f4f002392438eddfae08739897c..1ba4bdb35c4dda055b82853141b168472332e556 100644 (file)
@@ -6,13 +6,15 @@
     cache_valid_time: 3600
     install_recommends: no
     name: ['patchelf', # for auditwheel
-           'python', 'python2.7', 'python3', 'python-pip', 'python3-pip',
-           'python-setuptools', 'python3-setuptools',
+           'python', 'python2.7', 'python3', "{{ python_pip_pkg }}",
+           'python3-pip', 'python-setuptools', 'python3-setuptools',
            'python-gdbm', 'python-openssl', 'python3-openssl',
            'python-is-python2',
           ]
     state: latest
     update_cache: yes
+  vars:
+    python_pip_pkg: "python-pip{% if ansible_facts.distribution_major_version in ['9', '10'] %}{% elif ansible_facts.distribution_major_version == '11' %}-whl{% endif %}"
   register: python
   when: ansible_facts.os_family == 'Debian'