Add -f option for reading hosts from file or stdin.

This commit is contained in:
Darko Poljak 2016-05-22 09:22:39 +02:00
commit 4fce4a631c
3 changed files with 58 additions and 9 deletions

View file

@ -14,7 +14,7 @@ cdist [-h] [-d] [-v] [-V] {banner,config,shell} ...
cdist banner [-h] [-d] [-v]
cdist config [-h] [-d] [-V] [-c CONF_DIR] [-i MANIFEST] [-p] [-s] host [host ...]
cdist config [-h] [-d] [-V] [-c CONF_DIR] [-f HOSTFILE] [-i MANIFEST] [-p] [-s] [host [host ...]]
cdist shell [-h] [-d] [-v] [-s SHELL]
@ -63,6 +63,11 @@ Configure one or more hosts
--conf-dir argument have higher precedence over those set through the
environment variable.
-f HOSTFILE, --file HOSTFILE::
Read hosts to operate on from specified file or from stdin if '-'
(each host on separate line). If no host or host file is
specified then, by default, read hosts from stdin.
-i MANIFEST, --initial-manifest MANIFEST::
Path to a cdist manifest or - to read from stdin
@ -105,6 +110,9 @@ EXAMPLES
--remote-copy /path/to/my/remote/copy \
-p ikq02.ethz.ch ikq03.ethz.ch ikq04.ethz.ch
# Configure hosts in parallel by reading hosts from file loadbalancers
% cdist config -f loadbalancers
# Display banner
cdist banner