add user options to salt-key and to tests/minionswarm.py so one can run in userland

This commit is contained in:
Arthur Lutz 2014-01-23 12:22:26 +01:00
parent 362350a2b8
commit 0cad68c59d
2 changed files with 7 additions and 1 deletions

View File

@ -1610,7 +1610,7 @@ class SaltCPOptionParser(OptionParser, ConfigDirMixIn, MergeConfigMixIn,
class SaltKeyOptionParser(OptionParser, ConfigDirMixIn, MergeConfigMixIn,
LogLevelMixIn, OutputOptionsMixIn):
LogLevelMixIn, OutputOptionsMixIn, RunUserMixin):
__metaclass__ = OptionParserMeta

View File

@ -65,6 +65,12 @@ def parse():
dest='root_dir',
default=None,
help='Override the minion root_dir config')
parser.add_option(
'-c', '--config-dir', default='/etc/salt',
help=('Pass in an alternative configuration directory. Default: '
'%default')
)
parser.add_option('-u', '--user', default='root')
options, args = parser.parse_args()