I've inherited some dot-separated node attributes that I'm attempting to alter via ridley.
The items look like:
"installer": {
"properties": {
"config.admin.email": "admin@scottsuch.test.com"
}
}
Is there any way to escape the dots and tell ridely to update ['installer']['properties']['config.admin.email']
Some sample code:
require 'ridley'
kniferb = 'kniferb'
private_host = 'hostname'
new_url = 'scottsuch2.test.com'
ridley = Ridley.from_chef_config(kniferb, ssl: { verify: false })
node = ridley.node.find(private_host)
attr = 'installer.properties["config.admin.email"]'
node.set_chef_attribute(attr, "admin@#{new_url}")
After running the above, knife node edit gives me:
"installer": {
"properties[\"config": {
"admin": {
"email\"]": "admin@scottsuch2.test.com"
}
}
}