Policyfiles and overriding attributes


#1

I am trying to use a policy files with chef local mode. The use-case is I have a single cookbook and is exported to a tar ball using policy export command.
My cookbook uses some default attributes which I want to override using a json file and command like below:
chef-client -z -j deploy.json
My json simply has the following content
{
“app” : {
“env” : “dev”
}
}
and the same attribute is defined in attributes.rb file for my cookbook:
default[“app”][“env”] = “test”

I am getting an error at the end of cookbook execution that it fails to load the configuration from json file and it uses the attribute that is defined in attributes.rb file, ie. “test”

[2018-07-19T17:37:34+10:00] FATAL: Cannot load configuration from deploy.json