mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add name option to minionswarm so many hosts can check in
This commit is contained in:
parent
785829f95a
commit
8ac95960b3
1 changed files with 11 additions and 1 deletions
|
@ -36,6 +36,13 @@ def parse():
|
|||
dest='master',
|
||||
default='salt',
|
||||
help='The location of the salt master that this swarm will serve')
|
||||
parser.add_option('--name',
|
||||
'-n',
|
||||
dest='name',
|
||||
default='ms-',
|
||||
help=('Give the minions an alternative id prefix, this is used '
|
||||
'when minons from many systems are being aggregated onto '
|
||||
'a single master'))
|
||||
parser.add_option('-k',
|
||||
'--keep-modules',
|
||||
dest='keep',
|
||||
|
@ -109,7 +116,10 @@ class Swarm(object):
|
|||
'''
|
||||
Create a config file for a single minion
|
||||
'''
|
||||
minion_id = 'ms-{0}'.format(str(idx).zfill(self.__zfill))
|
||||
minion_id = '{0}-{1}'.format(
|
||||
self.opts['name'],
|
||||
str(idx).zfill(self.__zfill)
|
||||
)
|
||||
|
||||
dpath = os.path.join(self.swarm_root, minion_id)
|
||||
os.makedirs(dpath)
|
||||
|
|
Loading…
Add table
Reference in a new issue