| |
@@ -102,6 +102,8 @@
|
| |
help="path to private key for remote connections over ssh")
|
| |
parser.add_argument("--no-destroy", action="store_true",
|
| |
help="do not destroy disposable client at the end of task execution")
|
| |
+ parser.add_argument('--config', metavar="</path/to/config.yaml>",
|
| |
+ help="alternative taskotron.yaml config file")
|
| |
|
| |
return parser
|
| |
|
| |
@@ -122,6 +124,9 @@
|
| |
if '@' not in args['ssh']:
|
| |
parser.error("SSH connection info not in format 'user@machine' or 'user@machine:port'")
|
| |
|
| |
+ if args['config']:
|
| |
+ if not os.path.isfile(args['config']):
|
| |
+ parser.error('Option --config-file must have an existing file as argument')
|
| |
|
| |
def process_args(raw_args):
|
| |
""" Processes raw input args and converts them into specific data types that
|
| |
@@ -137,6 +142,9 @@
|
| |
# store the original unprocessed args for later use when passing it to the minion
|
| |
args['_orig_args'] = raw_args
|
| |
|
| |
+ if args['config']:
|
| |
+ config.CMD_CONF_FILE = args['config']
|
| |
+
|
| |
# process item + type
|
| |
if args['type'] in check.ReportType.list():
|
| |
args[args['type']] = args['item']
|
| |
Fixes #379