Skip to content
This repository has been archived by the owner on Jul 25, 2024. It is now read-only.

Attributes are symbols, policyfiles don't take symbols #4

Closed
mattray opened this issue Aug 9, 2018 · 4 comments
Closed

Attributes are symbols, policyfiles don't take symbols #4

mattray opened this issue Aug 9, 2018 · 4 comments

Comments

@mattray
Copy link

mattray commented Aug 9, 2018

Why not strings? If I try to use a symbol in my policyfile, I get this:

   Error: Failed to update Policyfile lock
   Reason: (ChefDK::InvalidPolicyfileAttribute) Invalid type in attributes. Only Hash, Array, String, Integer, Float, true, false, and nil are accepted. You gave :stable (Symbol)
@jjasghar
Copy link
Owner

jjasghar commented Aug 9, 2018

Fixed via 5e4452a

Pushed to the supermarket also.

~/repo/cookbooks/chefdk-cookbook on master [d]± chef-run 10.0.0.122 . --password admini --sudo-password admini --user admini
[✔] Packaging cookbook... done!
[✔] Generating local policyfile... exporting... done!
[✔] Applying chefdk::default from /Users/jjasghar/repo/cookbooks/chefdk-cookbook to target.
└── [✔] [10.0.0.122] Successfully converged chefdk::default.

@jjasghar jjasghar closed this as completed Aug 9, 2018
@mattray
Copy link
Author

mattray commented Aug 10, 2018

💥 Thanks JJ!

@mattray
Copy link
Author

mattray commented Aug 10, 2018

The ['chefdk']['channel'] is still a symbol.

@jjasghar
Copy link
Owner

It seems that chef-ingredient requires it to be: https://github.com/chef-cookbooks/chef-ingredient#properties

I did test like above and it did work with chef-run..... so maybe something is different?

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

No branches or pull requests

2 participants