57 lines
1.9 KiB
YAML
57 lines
1.9 KiB
YAML
---
|
|
- block:
|
|
- name: Install python pip
|
|
apt: name={{ item }} state={{ py_env_pkgs_state }} update_cache=yes cache_valid_time=600
|
|
with_items: '{{ py_env_basic_pkgs | default([]) }}'
|
|
|
|
- name: Install python deb packages
|
|
apt: name={{ item }} state={{ py_env_pkgs_state }} update_cache=yes cache_valid_time=600
|
|
with_items: '{{ py_env_dpkg | default([]) }}'
|
|
|
|
- name: Install deb packages needed to compile the pip modules
|
|
apt: name={{ item }} state={{ py_env_pkgs_state }} update_cache=yes cache_valid_time=600
|
|
with_items: '{{ py_pip_deps | default([]) }}'
|
|
|
|
- name: Fix the ssl warnings installing some ssl libraries
|
|
pip: name={{ item }}
|
|
with_items: '{{ py_env_pip_fix_ssl_warnings | default ([]) }}'
|
|
when:
|
|
- not py_env_trusty_workaround
|
|
- is_trusty
|
|
|
|
- name: Install a list of pip packages
|
|
pip: name={{ item }}
|
|
with_items: '{{ py_env_pip_pkgs | default ([]) }}'
|
|
when:
|
|
- not py_env_trusty_workaround
|
|
- is_trusty
|
|
|
|
when: py_env_install
|
|
tags: [ "python", "py_env" ]
|
|
|
|
- block:
|
|
- name: Install the get-pip.py pip downloader
|
|
get_url: url={{ py_env_get_pip_url }} dest=/usr/local/lib/get-pip.py
|
|
|
|
- name: Install a script that fixes the broken trusty pip package
|
|
copy: src=pip-fixer.sh dest=/usr/local/bin/python-pip-fixer mode=0755 owner=root group=root
|
|
register: python_pip_fixer
|
|
|
|
- name: Fix the trusty pip installation
|
|
shell: /usr/local/bin/python-pip-fixer
|
|
when: ( python_pip_fixer | changed )
|
|
|
|
- name: Fix the ssl warnings installing some ssl libraries
|
|
pip: name={{ item }}
|
|
with_items: '{{ py_env_pip_fix_ssl_warnings | default ([]) }}'
|
|
|
|
- name: Install a list of pip packages
|
|
pip: name={{ item }}
|
|
with_items: '{{ py_env_pip_pkgs | default ([]) }}'
|
|
|
|
when:
|
|
- py_env_trusty_workaround
|
|
- py_env_install
|
|
- is_trusty
|
|
tags: [ "python", "py_env" ]
|