Correcting rules for npm.

This commit is contained in:
Emiliano Vavassori 2016-02-17 23:25:24 +01:00
parent bed21a5dec
commit 14e7126cca
1 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@
state: present
become: yes
with_items: "{{ hostvars.localhost.addpkg }}"
when: hostvars.localhost.addpkg|join(' ')|trim != ''
when: hostvars.localhost.addpkg is defined and hostvars.localhost.addpkg|join(' ')|trim != ''
- name: Removing packages for specific role from NetworkPackageManager
apt:
@ -19,7 +19,7 @@
state: absent
purge: yes
with_items: "{{ hostvars.localhost.delpkg }}"
when: hostvars.localhost.delpkg|join(' ')|trim != ''
when: hostvars.localhost.delpkg is defined and hostvars.localhost.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 }}'