Fixing bug that blocks configuration chain when role-specific package list is empty.

This commit is contained in:
Emiliano Vavassori 2016-01-06 14:08:49 +01:00
parent 656e3fce7a
commit b3581a0b8f
1 changed files with 2 additions and 0 deletions

View File

@ -11,6 +11,7 @@
state: present
sudo: yes
with_items: "{{ addpkg }}"
when: addpkg|join(' ')|trim != ''
- name: Removing packages for specific role from NetworkPackageManager
apt:
@ -18,6 +19,7 @@
state: absent
purge: yes
with_items: "{{ delpkg }}"
when: delpkg|join(' ')|trim != ''
- name: Updating local hash for packages
shell: 'rm -f {{ ansible_local.checksum.pkgver_file }} && echo "{{ ansible_local.checksum.pkgver }}" > {{ ansible_local.checksum.pkgver_file }}'