mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
When using custom salt states we should allow the user to specify this on the command line.
This commit is contained in:
parent
27da42731d
commit
8076c9abb9
@ -29,6 +29,11 @@ class SaltCall(parsers.SaltCallOptionParser):
|
||||
pillar_root = os.path.abspath(self.options.pillar_root)
|
||||
self.config['pillar_roots'] = {'base': _expand_glob_path([pillar_root])}
|
||||
|
||||
if self.options.states_dir:
|
||||
# check if the argument is pointing to a file on disk
|
||||
states_dir = os.path.abspath(self.options.states_dir)
|
||||
self.config['states_dirs'] = [states_dir]
|
||||
|
||||
if self.options.local:
|
||||
self.config['file_client'] = 'local'
|
||||
if self.options.master:
|
||||
|
@ -2246,6 +2246,11 @@ class SaltCallOptionParser(six.with_metaclass(OptionParserMeta,
|
||||
default=None,
|
||||
help='Set this directory as the base pillar root.'
|
||||
)
|
||||
self.add_option(
|
||||
'--states-dir',
|
||||
default=None,
|
||||
help='Set this directory to search for additional states'
|
||||
)
|
||||
self.add_option(
|
||||
'--retcode-passthrough',
|
||||
default=False,
|
||||
|
Loading…
Reference in New Issue
Block a user