fix: handler, asset and filter wasn't idempotent
This commit is contained in:
parent
8ea56a7e1b
commit
67027a02b2
4 changed files with 5 additions and 4 deletions
|
@ -10,6 +10,7 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
|
|||
- feat: add mutators
|
||||
- feat: add sensu_agent_redact variable to add new redact keywords
|
||||
- fix: add new return code for api with the version 5.10
|
||||
- fix: handler, asset and filter wasn't idempotent
|
||||
- fix: create roles before users
|
||||
- doc: add example in readme
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ class SensuAsset:
|
|||
|
||||
def has_changed(self, options):
|
||||
for option, value in self.options.iteritems():
|
||||
if options[option] != value:
|
||||
if (options[option] or value) and options[option] != value:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
|
|
@ -22,7 +22,7 @@ class SensuFilter:
|
|||
if not option in options:
|
||||
if value:
|
||||
return True
|
||||
elif options[option] != value:
|
||||
elif (options[option] or value) and options[option] != value:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
|
|
@ -22,7 +22,7 @@ class SensuHandler:
|
|||
if not option in options:
|
||||
if value:
|
||||
return True
|
||||
elif options[option] != value:
|
||||
elif (options[option] or value) and options[option] != value:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
|
Loading…
Reference in a new issue