From 32b016d52e92ec4d6fff8c646085fae0a48f2f07 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Tue, 11 Oct 2016 17:41:28 +0200 Subject: [PATCH] library/roles/python-env/tasks/main.yml: Skip the task if the pip packages list is empty. --- python-env/tasks/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python-env/tasks/main.yml b/python-env/tasks/main.yml index 8efe3e2..73a1a75 100644 --- a/python-env/tasks/main.yml +++ b/python-env/tasks/main.yml @@ -3,18 +3,18 @@ - 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 }}' + with_items: '{{ py_env_basic_pkgs | default(omit) }}' - 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([]) }}' + with_items: '{{ py_env_dpkg | default(omit) }}' - 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([]) }}' + with_items: '{{ py_pip_deps | default(omit) }}' - name: Install a list of pip packages pip: name={{ item }} - with_items: '{{ py_env_pip_pkgs | default ([]) }}' + with_items: '{{ py_env_pip_pkgs | default (omit) }}' tags: [ "python", "py_env" ]