library/roles/python-env/tasks/main.yml: Update the apt cache if needed.

This commit is contained in:
Andrea Dell'Amico 2016-07-06 14:44:04 +02:00
parent 38b332ae2a
commit dd968c6364
1 changed files with 15 additions and 16 deletions

View File

@ -1,21 +1,20 @@
--- ---
- block:
- name: Install python pip - name: Install python pip
apt: name={{ item }} state={{ py_env_pkgs_state }} apt: name={{ item }} state={{ py_env_pkgs_state }} update_cache=yes
with_items: py_env_basic_pkgs with_items: '{{ py_env_basic_pkgs }}'
tags: [ "python", "py_env" ]
- name: Install python deb packages - name: Install python deb packages
apt: name={{ item }} state={{ py_env_pkgs_state }} apt: name={{ item }} state={{ py_env_pkgs_state }} update_cache=yes cache_valid_time=600
with_items: '{{ py_env_dpkg | default([]) }}' with_items: '{{ py_env_dpkg | default([]) }}'
tags: [ "python", "py_env" ]
- name: Install deb packages needed to compile the pip modules - name: Install deb packages needed to compile the pip modules
apt: name={{ item }} state={{ py_env_pkgs_state }} apt: name={{ item }} state={{ py_env_pkgs_state }} update_cache=yes cache_valid_time=600
with_items: '{{ py_pip_deps | default([]) }}' with_items: '{{ py_pip_deps | default([]) }}'
tags: [ "python", "py_env" ]
- name: Install a list of pip packages - name: Install a list of pip packages
pip: name={{ item }} virtualenv={{ py_env_env_base_dir }} pip: name={{ item }} virtualenv={{ py_env_env_base_dir }}
with_items: '{{ py_env_pip_pkgs | default ()[] }}' with_items: '{{ py_env_pip_pkgs | default ()[] }}'
tags: [ "python", "py_env" ]
tags: [ "python", "py_env" ]