From be33a296016ed8fbe52d86a471fbd36653acbe40 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 6 Jun 2019 19:13:13 +0200 Subject: [PATCH] cleanup the python-env role. --- library/roles/python-env/tasks/main.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/library/roles/python-env/tasks/main.yml b/library/roles/python-env/tasks/main.yml index bed3eff1..c82b185b 100644 --- a/library/roles/python-env/tasks/main.yml +++ b/library/roles/python-env/tasks/main.yml @@ -1,8 +1,7 @@ --- - 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([]) }}' + apt: name={{ py_env_basic_pkgs | default([]) }} state={{ py_env_pkgs_state }} update_cache=yes cache_valid_time=600 when: - py_env_install @@ -11,8 +10,7 @@ - block: - name: Remove python deb packages - apt: name={{ item }} state=absent - with_items: '{{ py_env_dpkg_toremove | default([]) }}' + apt: name={{ py_env_dpkg_toremove | default([]) }} state=absent when: - py_env_install @@ -20,16 +18,13 @@ - block: - 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([]) }}' + apt: name={{ py_env_dpkg | default([]) }} state={{ py_env_pkgs_state }} update_cache=yes cache_valid_time=600 - 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([]) }}' + apt: name={{ py_pip_deps | default([]) }} state={{ py_env_pkgs_state }} update_cache=yes cache_valid_time=600 - name: Install a list of pip packages - pip: name={{ item }} state=latest - with_items: '{{ py_env_pip_pkgs | default ([]) }}' + pip: name={{ py_env_pip_pkgs | default ([]) }} state=latest - name: Install a list of versioned pip packages pip: name={{ item.pkg }} version={{ item.version }}