From 9fc249ebc24f4d9de531b796b3e7f280c5c5631d Mon Sep 17 00:00:00 2001 From: Emiliano Vavassori Date: Tue, 8 Sep 2015 02:54:20 +0200 Subject: [PATCH] Other tentative fix - 3. --- roles/base/tasks/base.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/base/tasks/base.yml b/roles/base/tasks/base.yml index 4c35cff..247ed11 100644 --- a/roles/base/tasks/base.yml +++ b/roles/base/tasks/base.yml @@ -39,13 +39,13 @@ apt: pkg={{ item }} state=absent purge=yes with_items: "{{ base_client_delpkg }}" sudo: yes - when: "'{{ role }}' == 'client' and {{ base_client_delpkg|length }} > 0" + when: "'{{ role }}' == 'client' and {{ base_client_delpkg is defined }}" - name: Rimozione pacchetti installati ruolo docenti apt: pkg={{ item }} state=absent purge=yes with_items: "{{ base_docenti_delpkg }}" sudo: yes - when: "'{{ role }}' == 'docenti' and {{ base_docenti_delpkg|length }} > 0" + when: "'{{ role }}' == 'docenti' and {{ base_docenti_delpkg is defined }}" - name: Rimozione pacchetti non piĆ¹ necessari shell: apt-get -y autoremove @@ -63,13 +63,13 @@ apt: pkg={{ item }} state=present with_items: "{{ base_client_addpkg }}" sudo: yes - when: "'{{ role }}' == 'client' and {{ base_client_addpkg|length }} > 0" + when: "'{{ role }}' == 'client' and {{ base_client_addpkg is defined }}" - name: Installazione pacchetti installati ruolo docenti apt: pkg={{ item }} state=present with_items: "{{ base_docenti_addpkg }}" sudo: yes - when: "'{{ role }}' == 'docenti' and {{ base_docenti_addpkg|length }} > 0" + when: "'{{ role }}' == 'docenti' and {{ base_docenti_addpkg is defined }}" - name: Aggiungo VirtualBox Guest Additions, se necessario apt: pkg=virtualbox-guest-dkms state=present