mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Moved grabbing/overriding the minionswarm user to parse-time
This change provides a single source of truth for what user the swam will be running as.
This commit is contained in:
parent
a73f096fbd
commit
d779354351
1 changed files with 2 additions and 2 deletions
|
@ -71,7 +71,7 @@ def parse():
|
|||
help=('Pass in an alternative configuration directory. Default: '
|
||||
'%default')
|
||||
)
|
||||
parser.add_option('-u', '--user', default='root')
|
||||
parser.add_option('-u', '--user', default=pwd.getpwuid(os.getuid()).pw_name)
|
||||
|
||||
options, args = parser.parse_args()
|
||||
|
||||
|
@ -142,7 +142,7 @@ class Swarm(object):
|
|||
|
||||
data = {
|
||||
'id': minion_id,
|
||||
'user': pwd.getpwuid(os.getuid()).pw_name,
|
||||
'user': self.opts['user'],
|
||||
'pki_dir': minion_pkidir,
|
||||
'cachedir': os.path.join(dpath, 'cache'),
|
||||
'master': self.opts['master'],
|
||||
|
|
Loading…
Add table
Reference in a new issue