Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions plugins/action/icinga2_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ def run(self, tmp=None, task_vars=None):
tmp=tmp
)

if 'failed' in obj and obj['failed']:
raise AnsibleError('Call to module failed: %s' % obj['msg'])
if 'skipped' in obj and obj['skipped']:
raise AnsibleError('Call to module was skipped: %s' % obj['msg'])
if obj.get('failed', False):
raise AnsibleError('Call to module failed: %s' % obj.get('msg', obj))
if obj.get('skipped', False):
raise AnsibleError('Call to module was skipped: %s' % obj.get('msg', obj))

#
# file path handling for assemble
Expand Down