Numergy / cloud-init-cookbook

Chef cookbook to deploy cloud-init configuration files

Home Page:https://supermarket.chef.io/cookbooks/cloud_init

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Default attribute declared as list instead of hash

RulerOf opened this issue · comments

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.

commented

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

commented

Fixed in cloud_init 0.2.1. Thx!