-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Hash of Hashs format for specifying profiles does not work #339
Comments
@jquick from the logs it looks like the format in which you specified the ['audit'] ['profiles'] is not right the compliance key should be given in single quotes. Please verify and let me know if that works. |
Verified it does have a problem. |
any update on this issue? I'm also impacted. |
@jkovarick we are working on it. |
For posterities sake, I notice @mattray claiming that this does work: Not sure where the disconnect here is. |
I looked at those exact things this morning and was coming up with the same error referenced in the original post here. I was hoping it worked, because I'd prefer the hash of hashes setup. I think the disconnect here is that setting the attributes in a cookbook as a This would mean that users testing behavior in locations with high precedence are likely getting the expected behavior where users assigning profiles to run as part of a cookbook or in a wrapper cookbook for Since This appears to be related to the fact that the I think the issue of supporting both is discussed here #347 and it would seem that someone is exploring migrating the way profiles are added all together in #357. In the meantime people can work around the problem by being mindful of attribute precedence and being sure they are only using one type of profile setup in a given run. |
Policyfiles work because you just wind up autovivifying the node.role_default hash, which is not the same as the node.default level. You wind up deep merging an Array with an Hash, but sometime in chef-12-era i think i fixed that to work and the higher precedence level (policyfile level) will overwrite the Array with its Hash). |
(also explains why force_default works because that also is a totally separate data structure which gets processed by the deep merge algorithm) |
Profiles attribute is now a hash starting from version 9 of the cookbook. Closing this ticket. |
Description
Issue Description
New Hash of Hashs format for specifying profiles for the audit cookbook causes an error if actually used.
Issue Summary: In the README.md for the Audit cookbook there is a section that shows examples for specifying profiles to run using a Hash of Hashes (https://github.com/chef-cookbooks/audit#configure-node second set of examples).
Unfortunately because the "attributes/default.rb" defaults to create the attributes with
this causes an "no implicit conversion of String into Integer" error to be thrown when attempting to run the wrapper cookbook.
Expected Results: Specifying the profiles using the hash of hashes format should converge successfully without any errors
Actual Results: Converge errors with a "no implicit conversion of String into Integer" TypeError.
Repro Steps (if possible):
Request for Developers: Product Fix
Full exception from kitchen converge
The text was updated successfully, but these errors were encountered: