Salt's renderer system will load the dictionary from your JSON file
into a Python ordered dictionary. Since you're testing via `cmd.run`
that data structure will get cast to a string representation and the
shell is choking on that representation.
The shell will be happy for this particular test if you wrap it in quotes:
'echo "{0}"'.format(defaults)
Now that it's working you can reference the individual values:
'echo {0}'.format(defaults['1']['bar']) }
If you'd prefer to avoid the Pythonisms of ordered dictionaries you
can just turn it into a regular dictionary:
defaults = dict(__salt__.slsutil.renderer(local_path, renderer='json'))
On Thu, Jul 27, 2017 at 4:21 PM, Raja Vairaashtak