need a way to set remote.base_path from the command line

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2017-01-20 15:34:17 +01:00
parent 00a7f4af93
commit 93ccf925cd
2 changed files with 6 additions and 1 deletions

View file

@ -173,6 +173,10 @@ def get_parsers():
'-s', '--sequential',
help='operate on multiple hosts sequentially (default)',
action='store_false', dest='parallel')
parser['config_args'].add_argument(
'-r', '--remote-out-dir',
help='Directory to save cdist output in on the target host',
dest="remote_out_path")
parser['config'] = parser['sub'].add_parser(
'config', parents=[parser['loglevel'], parser['beta'],
parser['config_main'],

View file

@ -228,7 +228,8 @@ class Config(object):
remote = cdist.exec.remote.Remote(
target_host=target_host,
remote_exec=remote_exec,
remote_copy=remote_copy)
remote_copy=remote_copy,
base_path=args.remote_out_path)
c = cls(local, remote, dry_run=args.dry_run, jobs=args.jobs)
c.run()