ACK to the set, feel free to push. Couple small comments
- can you add bits similar to the ones you added to aeolus-configure
here to aeolus-cleanup to enable debugging and verbose logging there
- At some point it would be good to have selective logging, eg add
command line flags for --log-services, --log-rails, --no-log-data,
etc, and use these to set variables inside the recipe to control
exactly what is output. We can add this to another story for the
future though
-Mo
On 05/31/2011 06:08 AM, mtaylor(a)redhat.com wrote:
From: Martyn Taylor <mtaylor(a)redhat.com>
---
bin/aeolus-configure | 27 ++++++++++++++++++++++++++-
1 files changed, 26 insertions(+), 1 deletions(-)
diff --git a/bin/aeolus-configure b/bin/aeolus-configure
index 877b62b..b4c1f39 100644
--- a/bin/aeolus-configure
+++ b/bin/aeolus-configure
@@ -1,4 +1,28 @@
#!/bin/sh
+usage()
+{
+cat << EOF
+
+USAGE:
+aeolus-configure [-d|--debug] [-h|--help] [-v|--verbose]
+
+OPTIONS:
+ -h | --help Show this message.
+ -d | --debug Debug logging mode.
+ -v | --verbose Verbose logging mode.
+EOF
+}
+
+eval set -- `getopt -o hdv --long help,debug,verbose -- "$@"`
+while true ; do
+ case "$1" in
+ -h|--help) usage ; exit 1 ; shift ;;
+ -d|--debug) LOGLEVEL="--debug" ; shift ;;
+ -v|--verbose) LOGLEVEL="--verbose" ; shift ;;
+ --) shift ; break ;;
+ *) usage ; exit 1 ;;
+ esac
+done
export FACTER_AEOLUS_ENABLE_HTTPS=true
export FACTER_AEOLUS_ENABLE_SECURITY=false
@@ -6,5 +30,6 @@ puppet /usr/share/aeolus-configure/modules/aeolus/manifests/defaults.pp
\
--modulepath=/usr/share/aeolus-configure/modules/ \
--external_nodes '/usr/sbin/aeolus-node configure' --node_terminus exec
\
--logdest=/var/log/aeolus-configure/aeolus-configure.log \
- --logdest=console
+ --logdest=console \
+ $LOGLEVEL