mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
gate the minion data cache refresh events.
This commit is contained in:
parent
fb87010461
commit
a82e158f2d
@ -973,6 +973,22 @@ a minion performs an authentication check with the master.
|
||||
|
||||
auth_events: True
|
||||
|
||||
.. conf_master:: minion_data_cache_events
|
||||
|
||||
``minion_data_cache_events``
|
||||
--------------------
|
||||
|
||||
.. versionadded:: 2017.7.3
|
||||
|
||||
Default: ``True``
|
||||
|
||||
Determines whether the master will fire minion data cache events. Minion data
|
||||
cache events are fired when a minion requests a minion data cache refresh.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
minion_data_cache_events: True
|
||||
|
||||
.. _salt-ssh-configuration:
|
||||
|
||||
Salt-SSH Configuration
|
||||
|
@ -1087,6 +1087,9 @@ VALID_OPTS = {
|
||||
|
||||
# Whether to fire auth events
|
||||
'auth_events': bool,
|
||||
|
||||
# Whether to fire Minion data cache refresh events
|
||||
'minion_data_cache_events': bool,
|
||||
}
|
||||
|
||||
# default configurations
|
||||
@ -1654,6 +1657,7 @@ DEFAULT_MASTER_OPTS = {
|
||||
'drop_messages_signature_fail': False,
|
||||
'schedule': {},
|
||||
'auth_events': True,
|
||||
'minion_data_cache_events': True,
|
||||
}
|
||||
|
||||
|
||||
|
@ -741,7 +741,8 @@ class RemoteFuncs(object):
|
||||
self.cache.store('minions/{0}'.format(load['id']),
|
||||
'data',
|
||||
{'grains': load['grains'], 'pillar': data})
|
||||
self.event.fire_event('Minion data cache refresh', tagify(load['id'], 'refresh', 'minion'))
|
||||
if self.opts.get('minion_data_cache_events') is True:
|
||||
self.event.fire_event('Minion data cache refresh', tagify(load['id'], 'refresh', 'minion'))
|
||||
return data
|
||||
|
||||
def _minion_event(self, load):
|
||||
|
@ -1355,7 +1355,8 @@ class AESFuncs(object):
|
||||
'data',
|
||||
{'grains': load['grains'],
|
||||
'pillar': data})
|
||||
self.event.fire_event({'Minion data cache refresh': load['id']}, tagify(load['id'], 'refresh', 'minion'))
|
||||
if salt.opts.get('minion_data_cache_events') is True:
|
||||
self.event.fire_event({'Minion data cache refresh': load['id']}, tagify(load['id'], 'refresh', 'minion'))
|
||||
return data
|
||||
|
||||
def _minion_event(self, load):
|
||||
|
Loading…
Reference in New Issue
Block a user