diff --git a/bin/octocatalog-diff b/bin/octocatalog-diff --- a/bin/octocatalog-diff +++ b/bin/octocatalog-diff @@ -7,7 +7,7 @@ FACTS_DIR="${OCD_BASE}/facts" function usage { - echo "usage: $0 [-f/--from from_branch] [-t/--to to_branch] [--no-clean-tmp] [--r10k-args r10k-args] [--octocatalog-diff-args octocatalog-diff-args] host1 host2 ..." + echo "usage: $0 [-f/--from from_branch] [-t/--to to_branch] [--no-clean-tmp] [--r10k-args r10k-args] [--octocatalog-diff-args octocatalog-diff-args] [--environment environment] host1 host2 ..." } CLEAN_TMPDIR=true @@ -17,6 +17,7 @@ HOSTS=() OCTOCATALOG_DIFF_ARGS= R10K_ARGS= +PUPPET_ENVIRONMENT=production while (( "$#" )); do case "$1" in @@ -28,6 +29,10 @@ TO=$2 shift ;; + --environment) + PUPPET_ENVIRONMENT=$2 + shift + ;; --no-clean-tmp) CLEAN_TMPDIR=false ;; @@ -127,6 +132,7 @@ octocatalog-diff \ --bootstrapped-from-dir $TMPDIR/environments/$FROM \ --bootstrapped-to-dir $TMPDIR/environments/$TO \ + --environment $PUPPET_ENVIRONMENT \ -n $host \ --display-detail-add \ $OCTOCATALOG_DIFF_ARGS