Looks like I spoke too soon for this working for me.
strongbow ~ # salt ab04 grains.setval roles build
ab04:
roles: build
strongbow ~ # salt ab04 grains.setval roles cass
ab04:
roles: cass
strongbow ~ #
ab04 salt # grep roles !$
grep roles grains
roles: cass
ab04 salt #
grains.setval doesn't appear to accept multiple values with one key, either:
# salt ab04 sys.doc grains.setval roles ossec build storage mysql megaraid cass
Traceback (most recent call last):
File "/usr/bin/salt", line 10, in <module>
salt_main()
File "/usr/lib/python2.6/site-packages/salt/scripts.py", line 103, in salt_main
client.run()
File "/usr/lib/python2.6/site-packages/salt/cli/__init__.py", line 107, in run
self._output_ret(ret, out)
File "/usr/lib/python2.6/site-packages/salt/cli/__init__.py", line 125, in _output_ret
self._print_docs(ret)
File "/usr/lib/python2.6/site-packages/salt/cli/__init__.py", line 153, in _print_docs
if ret[host][fun]:
TypeError: string indices must be integers, not str
Should I file a bug for this? This doesn't seem like correct behavior, both for overriding current values/not working with multiple values, even those present.