Skip to content
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

Default attribute declared as list instead of hash #2

Closed
RulerOf opened this issue Sep 10, 2019 · 2 comments
Closed

Default attribute declared as list instead of hash #2

RulerOf opened this issue Sep 10, 2019 · 2 comments

Comments

@RulerOf
Copy link

RulerOf commented Sep 10, 2019

default['cloud_init']['cfgs'] = []

Linked above, the default['cloud_init']['cfgs'] in the cookbook attributes is set to [], which causes merge errors in Chef 12. Setting this:

default['cloud_init']['cfgs']['bq_core']['config']['disable_root'] = false

Yields this error:

       ================================================================================
       Recipe Compile Error in /tmp/kitchen/cache/cookbooks/bq-core/attributes/cloud.rb
       ================================================================================
       
       TypeError
       ---------
       no implicit conversion of String into Integer
       
       Cookbook Trace:
       ---------------
         /tmp/kitchen/cache/cookbooks/bq-core/attributes/cloud.rb:2:in `from_file'
       
       Relevant File Content:
       ----------------------
       /tmp/kitchen/cache/cookbooks/bq-core/attributes/cloud.rb:
       
         1:  # Cloud-init configs
         2>> default['cloud_init']['cfgs']['bq_core']['config']['disable_root'] = false
         3:  

I can override it by unfurling the hash or using an attribute of higher precedence for now.

@Sliim
Copy link
Member

Sliim commented Sep 11, 2019

Hi! Thanks for your report, it's a typo, I will fix that

@Sliim Sliim closed this as completed in c36ad6d Sep 11, 2019
@Sliim
Copy link
Member

Sliim commented Sep 11, 2019

Fixed in cloud_init 0.2.1. Thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants