Skip to content

Commit

Permalink
fixes debug v2
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderbazhenoff committed Apr 6, 2024
1 parent 2a5a576 commit 59976c7
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/ansible_molecule_teststing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,21 @@ jobs:
ls -lh / | grep tmp || true
- name: Molecule test
shell: bash
# poetry --ansi run ansible-galaxy install -r requirements.yml -vvv
run: |
printf "[defaults]\nremote_tmp = /tmp/.ansible-\${USER}/tmp" > $HOME/.ansible.cfg
cd roles/bareos
DEBUG_OPT="$([[ "${{ github.event.head_commit.message }}" =~ .(debug) ]] && echo '--debug')"
DEBUG_OPT="$([[ "$COMMIT_MSG" =~ .(debug) ]] && echo '--debug')"
VERBOSE_OPT="$([[ "$COMMIT_MSG" =~ .(debug).v([1-3]) ]] && echo '-v ${COMMIT_MSG/*debug v/}')"
echo "DEBUG_OPT: $DEBUG_OPT"
echo "VERBOSE_OPT: $VERBOSE_OPT"
set -x
if [[ -f "requirements.yml" ]]; then
poetry --ansi run ansible-galaxy install -r requirements.yml --server https://old-galaxy.ansible.com -v 1
if [[ -f "molecule/default/requirements.yml" ]]; then
poetry --ansi run ansible-galaxy install -r molecule/default/requirements.yml \
--server https://old-galaxy.ansible.com --timeout 300 $VERBOSE_OPT
fi
poetry --ansi run molecule $DEBUG_OPT test
poetry --ansi run molecule $DEBUG_OPT $VERBOSE_OPT test
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
COMMIT_MSG: ${{ github.event.head_commit.message }}

0 comments on commit 59976c7

Please sign in to comment.