2016-07-06 14:35:38 +02:00
|
|
|
---
|
2016-07-06 14:44:04 +02:00
|
|
|
- block:
|
|
|
|
- name: Install python pip
|
2016-07-06 14:44:28 +02:00
|
|
|
apt: name={{ item }} state={{ py_env_pkgs_state }} update_cache=yes cache_valid_time=600
|
2016-10-11 19:36:14 +02:00
|
|
|
with_items: '{{ py_env_basic_pkgs | default([]) }}'
|
2016-07-06 14:35:38 +02:00
|
|
|
|
2018-07-25 12:22:17 +02:00
|
|
|
when:
|
|
|
|
- py_env_install
|
2018-10-02 18:37:11 +02:00
|
|
|
- is_not_trusty
|
2018-07-25 12:22:17 +02:00
|
|
|
tags: [ "python", "py_env" ]
|
2018-10-02 18:54:54 +02:00
|
|
|
|
|
|
|
- block:
|
|
|
|
- name: Remove python deb packages
|
|
|
|
apt: name={{ item }} state=absent
|
|
|
|
with_items: '{{ py_env_dpkg_toremove | default([]) }}'
|
|
|
|
|
|
|
|
when:
|
|
|
|
- py_env_install
|
|
|
|
tags: [ "python", "py_env", "py_env_pkgs" ]
|
2018-07-25 12:22:17 +02:00
|
|
|
|
|
|
|
- block:
|
2016-07-06 14:44:04 +02:00
|
|
|
- name: Install python deb packages
|
|
|
|
apt: name={{ item }} state={{ py_env_pkgs_state }} update_cache=yes cache_valid_time=600
|
2016-10-11 19:36:14 +02:00
|
|
|
with_items: '{{ py_env_dpkg | default([]) }}'
|
2016-07-06 14:35:38 +02:00
|
|
|
|
2016-07-06 14:44:04 +02:00
|
|
|
- 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
|
2016-10-11 19:36:14 +02:00
|
|
|
with_items: '{{ py_pip_deps | default([]) }}'
|
2016-07-06 14:35:38 +02:00
|
|
|
|
2016-07-06 14:44:04 +02:00
|
|
|
- name: Install a list of pip packages
|
2018-07-23 18:03:54 +02:00
|
|
|
pip: name={{ item }} state=latest
|
2016-10-11 19:36:14 +02:00
|
|
|
with_items: '{{ py_env_pip_pkgs | default ([]) }}'
|
2016-07-06 14:35:38 +02:00
|
|
|
|
2017-09-02 17:15:03 +02:00
|
|
|
- name: Install a list of versioned pip packages
|
|
|
|
pip: name={{ item.pkg }} version={{ item.version }}
|
|
|
|
with_items: '{{ py_env_versioned_pip_pkgs | default ([]) }}'
|
|
|
|
|
2018-05-16 11:01:05 +02:00
|
|
|
when:
|
|
|
|
- py_env_install
|
2017-09-02 17:15:03 +02:00
|
|
|
tags: [ "python", "py_env", "py_env_pkgs" ]
|
2018-10-02 18:54:54 +02:00
|
|
|
|