aargh...
This commit is contained in:
@@ -54,7 +54,6 @@ GIT_REPO_BASE="https://gitea.admin-a.hpetersenfamily.com/heath/ansible"
|
|||||||
GIT_REPO="${GIT_REPO_BASE}.git"
|
GIT_REPO="${GIT_REPO_BASE}.git"
|
||||||
|
|
||||||
# - Include ansible virtual environment (in case not already done - we don't know how we're being run)
|
# - Include ansible virtual environment (in case not already done - we don't know how we're being run)
|
||||||
VIRTUAL_ENV_DISABLE_PROMPT=true
|
|
||||||
. "${VENV_ACTIVATE_SCRIPT}"
|
. "${VENV_ACTIVATE_SCRIPT}"
|
||||||
|
|
||||||
# - If we can't get a lock, don't proceed
|
# - If we can't get a lock, don't proceed
|
||||||
@@ -68,7 +67,7 @@ if ! flock -n 9 ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# - If debugging requested or running from a terminal . . .
|
# - If debugging requested or running from a terminal . . .
|
||||||
if [ "${DEBUG_FLAG}" = "true" || test -t 1 ] ; then
|
if [ "${DEBUG_FLAG}" = "true" ] || test -t 0 ; then
|
||||||
exec > >(tee -a "${LOG_FILE}") 2>&1 # - send STDOUT and STDERR to both STDOUT and the log file
|
exec > >(tee -a "${LOG_FILE}") 2>&1 # - send STDOUT and STDERR to both STDOUT and the log file
|
||||||
else
|
else
|
||||||
exec >>"${LOG_FILE}" 2>&1 # - send STDOUT and STDERR to the log file only
|
exec >>"${LOG_FILE}" 2>&1 # - send STDOUT and STDERR to the log file only
|
||||||
@@ -76,7 +75,7 @@ fi
|
|||||||
|
|
||||||
# - Log that we've gotten this far
|
# - Log that we've gotten this far
|
||||||
echo
|
echo
|
||||||
echo "${SCRIPT_NAME}: $(date "+%Y-%m-%d %H:%M:%S") ----------------------------------------"
|
echo "${SCRIPT_NAME}: ------------------------------- $(date "+%Y-%m-%d %H:%M:%S") -------------------------------"
|
||||||
|
|
||||||
# - Do our work
|
# - Do our work
|
||||||
ansible-pull ${OIC_FLAG} ${VERBOSE_FLAG} --url "${GIT_REPO}" --checkout "${GIT_REPO_BRANCH}" "${@}"
|
ansible-pull ${OIC_FLAG} ${VERBOSE_FLAG} --url "${GIT_REPO}" --checkout "${GIT_REPO_BRANCH}" "${@}"
|
||||||
Executable
+11
@@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
send_some_output() {
|
||||||
|
echo "hello"
|
||||||
|
echo "here"
|
||||||
|
echo "goodbye"
|
||||||
|
}
|
||||||
|
|
||||||
|
exec > >(tee -a ./x.out) 2>&1
|
||||||
|
|
||||||
|
send_some_output >&2
|
||||||
Reference in New Issue
Block a user