Add second arg for DebOps playbook function
This commit is contained in:
parent
b23a2edbde
commit
26b770959d
12
zshrc
12
zshrc
|
@ -1026,7 +1026,11 @@ function debservice() {
|
||||||
## Apply a playbook to a define host(s)/group(s) {{{
|
## Apply a playbook to a define host(s)/group(s) {{{
|
||||||
function debplay() {
|
function debplay() {
|
||||||
if [ ${ANS_HOST} ]; then
|
if [ ${ANS_HOST} ]; then
|
||||||
debops run "${1:-/dev/null}" --limit "${ANS_HOST}"
|
if [ ! ${2} ]; then
|
||||||
|
debops run "${1:-/dev/null}" --limit "${ANS_HOST}"
|
||||||
|
else
|
||||||
|
debops run "${1:-/dev/null}" --limit "${ANS_HOST}" --tags "role::${2:-/dev/null}"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
printf '%b' "${MAGENTA}ANS_HOST${RESET} vars is ${REDB}not${RESET} define !\n"
|
printf '%b' "${MAGENTA}ANS_HOST${RESET} vars is ${REDB}not${RESET} define !\n"
|
||||||
fi
|
fi
|
||||||
|
@ -1072,7 +1076,11 @@ function debcservice() {
|
||||||
## Check a playbook to a define host(s)/group(s) {{{
|
## Check a playbook to a define host(s)/group(s) {{{
|
||||||
function debcplay() {
|
function debcplay() {
|
||||||
if [ ${ANS_HOST} ]; then
|
if [ ${ANS_HOST} ]; then
|
||||||
debops check "${1:-/dev/null}" --limit "${ANS_HOST}"
|
if [ ! ${2} ]; then
|
||||||
|
debops run "${1:-/dev/null}" --limit "${ANS_HOST}"
|
||||||
|
else
|
||||||
|
debops run "${1:-/dev/null}" --limit "${ANS_HOST}" --tags "role::${2:-/dev/null}"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
printf '%b' "${MAGENTA}ANS_HOST${RESET} vars is ${REDB}not${RESET} define !\n"
|
printf '%b' "${MAGENTA}ANS_HOST${RESET} vars is ${REDB}not${RESET} define !\n"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue