Add --skip-grains option to salt-run

This will allow the user to skip grains generation and save the
2+ seconds it takes to generate grains for each call to `salt-run`.
Grains are not commonly used in runners.

Signed-off-by: Sergey Kizunov <sergey.kizunov@ni.com>
This commit is contained in:
Sergey Kizunov 2017-08-07 14:09:31 -05:00
parent 1f460da589
commit a0b4af4e73

View File

@ -2782,6 +2782,12 @@ class SaltRunOptionParser(six.with_metaclass(OptionParserMeta,
action='store_true', action='store_true',
help=('Start the runner operation and immediately return control.') help=('Start the runner operation and immediately return control.')
) )
self.add_option(
'--skip-grains',
default=False,
action='store_true',
help=('Do not load grains.')
)
group = self.output_options_group = optparse.OptionGroup( group = self.output_options_group = optparse.OptionGroup(
self, 'Output Options', 'Configure your preferred output format.' self, 'Output Options', 'Configure your preferred output format.'
) )