Merge pull request #26566 from cachedout/warn_on_masterless_publish

Don't stacktrace trying to publish without a master
This commit is contained in:
Pedro Algarvio 2015-08-23 00:09:04 +01:00
commit be71ab9652

View File

@ -66,6 +66,9 @@ def _publish(
salt system.example.com publish.publish '*' cmd.run 'ls -la /tmp'
'''
if 'master_uri' not in __opts__:
log.error('Cannot run publish commands without a connection to a salt master. No command sent.')
return {}
if fun.startswith('publish.'):
log.info('Cannot publish publish calls. Returning {}')
return {}