Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Commit

Permalink
Merge pull request #100 from jaredledvina/feature/nothing-to-see-here
Browse files Browse the repository at this point in the history
go-sensu-check: Actually fixup diff output
  • Loading branch information
jaredledvina authored May 17, 2019
2 parents 6f1663b + 34e6f37 commit 2cad6fc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions library/sensu_go_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,16 +508,15 @@ def run_module():
check_def.pop(attribute)
difference = recursive_diff(response, check_def)
if difference:
result['before'] = difference[0]
result['after'] = difference[1]
result['diff'] = {'before': '', 'after': ''}
result['diff']['before'] = difference[0]
result['diff']['after'] = difference[1]
if module.check_mode:
result['message'] = 'Would have updated Sensu Go check: {0}'.format(module.params['name'])
result['diff'] = difference
result['changed'] = True
else:
response, info = module.put_check(check_def)
result['message'] = 'Updated existing Sensu Go check: {0}'.format(module.params['name'])
result['diff'] = difference
result['changed'] = True
else:
result['message'] = 'Sensu Go check already exists and doesn\'t need to be updated: {0}'.format(module.params['name'])
Expand Down

0 comments on commit 2cad6fc

Please sign in to comment.