modules.event.send(): Also check for file_client and use_master_when_local opts

This commit is contained in:
Elias Probst 2016-08-12 12:27:02 +02:00
parent c032506e6b
commit 8d7244bdd9
No known key found for this signature in database
GPG key ID: 82C512826511BADB

View file

@ -39,7 +39,7 @@ def fire_master(data, tag, preload=None):
salt '*' event.fire_master '{"data":"my event data"}' 'tag'
'''
if __opts__.get('local', None):
if (__opts__.get('local', None) or __opts__.get('file_client', None) == 'local') and not __opts__.get('use_master_when_local', False):
# We can't send an event if we're in masterless mode
log.warning('Local mode detected. Event with tag {0} will NOT be sent.'.format(tag))
return False