diff --git a/.github/workflows/ansible_molecule_teststing.yml b/.github/workflows/ansible_molecule_teststing.yml index b481004..00fbcdb 100644 --- a/.github/workflows/ansible_molecule_teststing.yml +++ b/.github/workflows/ansible_molecule_teststing.yml @@ -59,13 +59,15 @@ jobs: poetry --version || true ESC="$(printf "\033")" printf "Packages:\n%s\n \n" "$(poetry --ansi run pip list | sed -e "s/ /${ESC}[1;35m /g; s/$/${ESC}[0m/g")" + # Use 'debug' word in commit message to debug molecule testing, use debug v[1..6] to enable verbose logging. - name: Molecule test shell: bash run: | printf "[defaults]\nremote_tmp = /tmp/.ansible-\${USER}/tmp" > $HOME/.ansible.cfg cd roles/bareos DEBUG_OPT=$([[ "$COMMIT_MSG" =~ .(debug) ]] && echo "--debug") - VERB_OPT=$([[ "$COMMIT_MSG" =~ .(debug).v([1-6]) ]] && printf '-%*s' "${COMMIT_MSG/*debug v/}" | tr ' ' 'v') + VERB_OPT=$([[ "$COMMIT_MSG" =~ .(debug).v([1-6]) ]] && (printf "-" && printf "%*s" ${COMMIT_MSG/*debug v/} | \ + tr ' ' 'v')) echo "DEBUG_OPT: $DEBUG_OPT" echo "VERB_OPT: $VERB_OPT" set -x