You're not parsing that file as JSON; just doing a File.read returns a JSON-encoded string. I'd suggest reading the Ruby stdlib documentation around the File and JSON classes. Also, that file doesn't exist in the location you specified if it's not setting zookeeper_hosts / @zookeeper to the contents of the file. How are you saving it to the Chef file cache? If the script is available on the machine itself, have you thought about executing it with Chef and capturing/parsing the output? Sent from my iPhone
|
Archive powered by MHonArc 2.6.16.