Skip to content

Instantly share code, notes, and snippets.

@UtahCampusD
Created October 24, 2016 16:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save UtahCampusD/c9a8eff9637568f516eddd000b2f66be to your computer and use it in GitHub Desktop.
Save UtahCampusD/c9a8eff9637568f516eddd000b2f66be to your computer and use it in GitHub Desktop.
From CLI works
salt-call grains.item id
local:
----------
id:
minionid.example.com
Python 2.6.9 (unknown, Sep 1 2016, 23:34:36)
[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import salt.client
>>> caller = salt.client.Caller()
>>> print caller.cmd('grains.item','id')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'Caller' object has no attribute 'cmd'
salt-minion --versions
Salt: 2015.5.10
Python: 2.6.9 (unknown, Sep 1 2016, 23:34:36)
Jinja2: 2.7.2
M2Crypto: 0.21.1
msgpack-python: 0.4.6
msgpack-pure: Not Installed
pycrypto: 2.6.1
libnacl: Not Installed
PyYAML: 3.10
ioflo: Not Installed
PyZMQ: 14.3.1
RAET: Not Installed
ZMQ: 3.2.5
Mako: Not Installed
Tornado: Not Installed
timelib: Not Installed
dateutil: Not Installed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment