Process ssh_minion_opts from master config

Taking the minion config from the master system is dangerous, because
there may be an actual minion on the system and if we're not careful we
may override options we don't want to, resulting in hard-to-track-down
errors. Instead, allow for explicit minion config defined in the master.
This commit is contained in:
Colton Myers 2015-05-01 16:21:51 -06:00
parent 3b64214377
commit e2099b6e1b

View File

@ -561,10 +561,7 @@ class Single(object):
'sudo': sudo, 'sudo': sudo,
'tty': tty, 'tty': tty,
'mods': self.mods} 'mods': self.mods}
minion_config_file = os.path.join(opts.get('config_dir', '/etc/salt'), minion_opts = opts.get('ssh_minion_opts', {})
'minion')
minion_opts = salt.config.load_config(minion_config_file,
'SALT_MINION_CONFIG')
minion_opts.update({ minion_opts.update({
'root_dir': os.path.join(self.thin_dir, 'running_data'), 'root_dir': os.path.join(self.thin_dir, 'running_data'),
'id': self.id, 'id': self.id,