diff --git a/pepper/cli.py b/pepper/cli.py index 68901d9..5979e28 100644 --- a/pepper/cli.py +++ b/pepper/cli.py @@ -108,6 +108,13 @@ def parse(self): ''') ) + self.parser.add_option( + '--output-force-color', dest='output_force_color', default=False, action='store_true', + help=textwrap.dedent(''' + Force salt outputter to use color when printing. + ''') + ) + self.parser.add_option( '--output-file', dest='output_file', default=None, help=textwrap.dedent(''' diff --git a/pepper/script.py b/pepper/script.py index 21afe63..61e304c 100755 --- a/pepper/script.py +++ b/pepper/script.py @@ -32,6 +32,8 @@ def __init__(self): self.cli = PepperCli() if HAS_SALT: self.opts = salt.config.client_config(self.cli.options.master) + if self.cli.options.output_force_color: + self.opts['color'] = True else: self.opts = {} if self.cli.options.output_file is not None: