Allow disabling the mines details merge

This commit is contained in:
Mircea Ulinic 2017-07-05 10:54:45 +00:00
parent 732b63b0b9
commit cdc0d9674a
2 changed files with 6 additions and 1 deletions

View file

@ -583,6 +583,9 @@ VALID_OPTS = {
# Considered only when `proxy_merge_pillar_in_opts` is True.
'proxy_merge_pillar_in_opts_strategy': str,
# Allow enabling mine details using pillar data.
'proxy_mines_pillar': bool,
# In some particular cases, always alive proxies are not beneficial.
# This option can be used in those less dynamic environments:
# the user can request the connection
@ -1655,6 +1658,8 @@ DEFAULT_PROXY_MINION_OPTS = {
'proxy_deep_merge_pillar_in_opts': False,
'proxy_merge_pillar_in_opts_strategy': 'smart',
'proxy_mines_pillar': True,
# By default, proxies will preserve the connection.
# If this option is set to False,
# the connection with the remote dumb device

View file

@ -3125,7 +3125,7 @@ class ProxyMinion(Minion):
self.opts['pillar'],
strategy=self.opts.get('proxy_merge_pillar_in_opts_strategy'),
merge_lists=self.opts.get('proxy_deep_merge_pillar_in_opts', False))
else:
elif self.opts.get('proxy_mines_pillar'):
# Even when not required, some details such as mine configuration
# should be merged anyway whenever possible.
if 'mine_interval' in self.opts['pillar']: