A little script to run a single CFEngine bundle with arguments for rapid
prototyping, inspired by cf-cmd
.
(If your bundle doesn't take any arguments, you can just use
cf-agent --bundlesequence <bundle>
.)
-
Customise the
CFENGINE_MASTERFILES_DIR
andLIBRARY_FILES
variables to match your setup. -
Run with:
$ sudo ./run_bundle.sh [options] <bundle to run> [arg 1] [arg 2] ...
Options:
-
-v
: runcf-agent
with--verbose
-
-s
: pass arguments as an slist rather than individually -
-f bundle.cf
: usebundle.cf
for source of bundle -
-D classes
: define 'classes' (comma-separated) at the start of thecf-agent
runIf
-f
not specified, look for the bundle inCFENGINE_MASTERFILES_DIR
-
-
run_bundle.sh
will create a wrapper policy to run the bundle, and run it withcf-agent
.