From 93ccf925cde03d8d47223fe74130f7b1d29edebc Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Fri, 20 Jan 2017 15:34:17 +0100 Subject: [PATCH 1/3] need a way to set remote.base_path from the command line Signed-off-by: Steven Armstrong --- cdist/argparse.py | 4 ++++ cdist/config.py | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cdist/argparse.py b/cdist/argparse.py index 045c12bc..bdda5933 100644 --- a/cdist/argparse.py +++ b/cdist/argparse.py @@ -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'], diff --git a/cdist/config.py b/cdist/config.py index 03a2e6ee..271aea38 100644 --- a/cdist/config.py +++ b/cdist/config.py @@ -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() From 9cee230ef59967840412019560509e6c0c873632 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 27 Jun 2017 17:47:30 +0200 Subject: [PATCH 2/3] alphabetical order ftw Signed-off-by: Steven Armstrong --- cdist/argparse.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cdist/argparse.py b/cdist/argparse.py index bdda5933..5873b8ef 100644 --- a/cdist/argparse.py +++ b/cdist/argparse.py @@ -169,14 +169,14 @@ def get_parsers(): '-p', '--parallel', help='operate on multiple hosts in parallel', action='store_true', dest='parallel') - parser['config_args'].add_argument( - '-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_args'].add_argument( + '-s', '--sequential', + help='operate on multiple hosts sequentially (default)', + action='store_false', dest='parallel') parser['config'] = parser['sub'].add_parser( 'config', parents=[parser['loglevel'], parser['beta'], parser['config_main'], From f968d90475388a18e9e0ef37a714390411fdbaa1 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 27 Jun 2017 17:49:58 +0200 Subject: [PATCH 3/3] docs++ Signed-off-by: Steven Armstrong --- docs/src/man1/cdist.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/src/man1/cdist.rst b/docs/src/man1/cdist.rst index a46e1e02..ea3ded12 100644 --- a/docs/src/man1/cdist.rst +++ b/docs/src/man1/cdist.rst @@ -115,6 +115,10 @@ Configure/install one or more hosts. Operate on multiple hosts in parallel +.. option:: -r, --remote-out-dir + + Directory to save cdist output in on the target host + .. option:: -s, --sequential Operate on multiple hosts sequentially (default)