]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commit
handler: default to empty array if task skipped 1814/head
authorSébastien Han <seb@redhat.com>
Fri, 25 Aug 2017 16:00:03 +0000 (18:00 +0200)
committerSébastien Han <seb@redhat.com>
Fri, 25 Aug 2017 16:39:00 +0000 (18:39 +0200)
commit29753da05c4d474b67f97d8f812514efb03f28a9
tree9e5d5d52f2ba4f2905af3b6a744217efb1d7395e
parentd132605cb5eb750a26e6b9d209c425429f3ea709
handler: default to empty array if task skipped

with_items is evaluated before the when condition so if the task that
registers the 'results' is skipped the task will fail with:

{"failed": true, "msg": "'dict object' has no attribute 'results'"}

Defaulting to an empty array fixes the issue.

Reverts: abdd66619e1d5c94f74e994bff667b5ccc6b529f
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1482061
Signed-off-by: Sébastien Han <seb@redhat.com>
roles/ceph-defaults/handlers/main.yml