You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a key in a JSON file managed by sensu has been set, e.g. setting sensu::api_user to admin, it is impossible to get the puppet module to remove the key in a subsequent puppet run by changing the parameter.
I initially tried not specifying the key, which should have used the default undef value, but the JSON was not changed. Explicitly setting sensu::api_user to undef has no effect either. Setting sensu::api_user to another value does change the JSON, so it's not a problem of the file already existing.
A fairly unpleasant workaround is to SSH into my puppet-managed machine and edit the file by hand, ignoring the fact that the file permissions are read-only.
The text was updated successfully, but these errors were encountered:
This is a limitation of puppet < 4.0.0 where puppet doesn't have a true "undefined" and as such, the providers aren't able to determine the parameter is unset. #166 talks about this a bit more as well.
I would have expected the files to just be templates rather than custom types, since all of the parameters in the files can be managed by puppet-sensu. This would allow you to delete a large number of custom types and providers, plus fixing this for free - if the parameter isn't present, the template will know not to include it.
Is there a reason this module is using custom types to manage simple files?
Because we decided to be consistent across the module and create custom types and providers for everything. It's generally best practice to do so. Indeed it's a lot cleaner and more elegant that for loops in templates. In this case I have no objection to PRs that replace some of the simple types with templates etc.
If a key in a JSON file managed by sensu has been set, e.g. setting
sensu::api_usertoadmin, it is impossible to get the puppet module to remove the key in a subsequent puppet run by changing the parameter.I initially tried not specifying the key, which should have used the default
undefvalue, but the JSON was not changed. Explicitly settingsensu::api_usertoundefhas no effect either. Settingsensu::api_userto another value does change the JSON, so it's not a problem of the file already existing.A fairly unpleasant workaround is to SSH into my puppet-managed machine and edit the file by hand, ignoring the fact that the file permissions are read-only.
The text was updated successfully, but these errors were encountered: