--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/bc101e02-1eea-4820-a51c-202c4e396f0c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
If you want to use the salt modules directly, you should use them through the loader interface described here.Thanks,Daniel
On Thu, Apr 20, 2017 at 11:20 AM, geo dezix <geod...@gmail.com> wrote:
Get errors like this in my watchtower.py scriptTraceback (most recent call last):
File "./watchtower.py", line 45, in <module>
saltmasterservices('CRPdgMUSsaltlab01', 'httpd')
File "./watchtower.py", line 42, in saltmasterservices
getStatusAndStart(var)
File "./watchtower.py", line 19, in getStatusAndStart
__salt__['event.send']('watchtower/%s/saltmasterservices/fail' % sensor.split('-')[0], data={"sensor": sensor, "service": services })
NameError: global name '__salt__' is not definedis there a site that tells all the imports needed for __salt__ modules; for example:__salt__['service.restart'](services)and__salt__['service.status'](services)and__salt__['event.send']('watchtower/%s/saltmasterservices/fail' % sensor.split('-')[0], data={"sensor": sensor, "service": services })
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/96a864ac-1c79-4b8c-80ad-e9b3b1a043e6%40googlegroups.com.