mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 16:45:27 +00:00
Disable fileserver events by default
@jacksontj, this turns off these event by default and you will need to set this flag in your config in the future
This commit is contained in:
parent
1be24c30c4
commit
fa1c9c4401
@ -348,6 +348,11 @@
|
||||
#
|
||||
# fileserver_limit_traversal: False
|
||||
#
|
||||
# The fileserver can fire events off every time the fileserver is updated,
|
||||
# these are disabled by default, but can be easily turned on by setting this
|
||||
# flag to True
|
||||
#fileserver_events: False
|
||||
#
|
||||
# Git fileserver backend configuration
|
||||
# When using the git fileserver backend at least one git remote needs to be
|
||||
# defined. The user running the salt master will need read access to the repo.
|
||||
|
@ -202,8 +202,9 @@ def update():
|
||||
pass
|
||||
|
||||
# if there is a change, fire an event
|
||||
event = salt.utils.event.MasterEvent(__opts__['sock_dir'])
|
||||
event.fire_event(data, tagify(['gitfs', 'update'], prefix='fileserver'))
|
||||
if __opts__.get('fileserver_events', False):
|
||||
event = salt.utils.event.MasterEvent(__opts__['sock_dir'])
|
||||
event.fire_event(data, tagify(['gitfs', 'update'], prefix='fileserver'))
|
||||
try:
|
||||
salt.fileserver.reap_fileserver_cache_dir(
|
||||
os.path.join(__opts__['cachedir'], 'gitfs/hash'),
|
||||
|
@ -196,8 +196,9 @@ def update():
|
||||
pass
|
||||
|
||||
# if there is a change, fire an event
|
||||
event = salt.utils.event.MasterEvent(__opts__['sock_dir'])
|
||||
event.fire_event(data, tagify(['hgfs', 'update'], prefix='fileserver'))
|
||||
if __opts__.get('fileserver_events', False):
|
||||
event = salt.utils.event.MasterEvent(__opts__['sock_dir'])
|
||||
event.fire_event(data, tagify(['hgfs', 'update'], prefix='fileserver'))
|
||||
try:
|
||||
salt.fileserver.reap_fileserver_cache_dir(
|
||||
os.path.join(__opts__['cachedir'], 'hgfs/hash'),
|
||||
|
@ -146,9 +146,10 @@ def update():
|
||||
fp_.write('{file_path}:{mtime}\n'.format(file_path=file_path,
|
||||
mtime=mtime))
|
||||
|
||||
# if there is a change, fire an event
|
||||
event = salt.utils.event.MasterEvent(__opts__['sock_dir'])
|
||||
event.fire_event(data, tagify(['roots', 'update'], prefix='fileserver'))
|
||||
if __opts__.get('fileserver_events', False):
|
||||
# if there is a change, fire an event
|
||||
event = salt.utils.event.MasterEvent(__opts__['sock_dir'])
|
||||
event.fire_event(data, tagify(['roots', 'update'], prefix='fileserver'))
|
||||
|
||||
|
||||
def file_hash(load, fnd):
|
||||
|
Loading…
Reference in New Issue
Block a user