bbg-cookbooks / monit-ng

chef cookbook for installing/configuring monit from package or source, with resource provider for managing monit checks
https://github.com/bbg-cookbooks/monit
Apache License 2.0
12 stars 35 forks source link

chef 13 compatibility in monit.conf.erb (was Clarify configuration) #71

Closed StuporHero closed 7 years ago

StuporHero commented 7 years ago

Can you provide examples of how to set the configuration in attribute files? It appears that they should be assigned arrays of hashes with the appropriate data elements, but this does not jive with the default template which apparently uses dot notation to try to access the data. Either the template should use the proper hash key syntax (for example mailserver['hostname'] instead of mailserver.hostname), or an example should be given demonstrating how this is supposed to be used so future users don't have to chase their tails for days trying to figure out what's wrong with their config.

nathwill commented 7 years ago

hey @StuporHero.

first off: easy on the passive-aggressiveness, nobody working on this cookbook owes you a thing; if you don't like the cookbook, there's other options.

second: this looks to have recently changed with the release of chef 13; in my testing, it didn't matter whether you used string or symbols for the hash keys in chef 12, it would work the same, whereas in chef 13, the dot-notation fails no matter how you format the attributes.

this is obviously something that will need to be fixed for this cookbook to work with chef 13, so i'm updating the title for your issue and will work on this as a chef-13 compat fix.

StuporHero commented 7 years ago

I'd prefer that you stick to talking about the software. My pull request should solve this bug.

nathwill commented 7 years ago

samesies ;). PR merged, thanks!

nathwill commented 7 years ago

pushed to supermarket as 2.4.0.

StuporHero commented 7 years ago

Thanks for the quick turnaround.