mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Ensure batch uses passed eauth token or credentials
This commit is contained in:
parent
6df76f6687
commit
5fb8190d44
1 changed files with 5 additions and 1 deletions
|
@ -516,10 +516,14 @@ class LocalClient(object):
|
|||
if 'gather_job_timeout' in kwargs:
|
||||
opts['gather_job_timeout'] = kwargs['gather_job_timeout']
|
||||
|
||||
eauth=kwargs.get('eauth', {})
|
||||
if 'token' in kwargs:
|
||||
eauth['token'] = kwargs['token']
|
||||
|
||||
for key, val in six.iteritems(self.opts):
|
||||
if key not in opts:
|
||||
opts[key] = val
|
||||
batch = salt.cli.batch.Batch(opts, quiet=True)
|
||||
batch = salt.cli.batch.Batch(opts, eauth=eauth, quiet=True)
|
||||
for ret in batch.run():
|
||||
yield ret
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue