diff --git a/.github/workflows/ansible_molecule_teststing.yml b/.github/workflows/ansible_molecule_teststing.yml index 00fbcdb..e258f46 100644 --- a/.github/workflows/ansible_molecule_teststing.yml +++ b/.github/workflows/ansible_molecule_teststing.yml @@ -14,7 +14,9 @@ concurrency: cancel-in-progress: true env: - PREINSTALL_MOLECULE_REQUIREMENTS: 'true' + PREINSTALL_MOLECULE_REQUIREMENTS: 'false' + PREINSTALL_MOLECULE_REQUIREMENTS_YAML_PATH: roles/requirements.yml + PREINSTALL_MOLECULE_REQUIREMENTS_SERVER: https://old-galaxy.ansible.com jobs: test_bareos: @@ -64,17 +66,17 @@ jobs: 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 "-" && printf "%*s" ${COMMIT_MSG/*debug v/} | \ tr ' ' 'v')) echo "DEBUG_OPT: $DEBUG_OPT" echo "VERB_OPT: $VERB_OPT" set -x - if $PREINSTALL_MOLECULE_REQUIREMENTS && [[ -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 $VERB_OPT + if $PREINSTALL_MOLECULE_REQUIREMENTS && [[ -f "$PREINSTALL_MOLECULE_REQUIREMENTS_YAML_PATH" ]]; then + poetry --ansi run ansible-galaxy install -r "$PREINSTALL_MOLECULE_REQUIREMENTS_YAML_PATH" \ + --server "$PREINSTALL_MOLECULE_REQUIREMENTS_SERVER" --timeout 300 $VERB_OPT fi + cd roles/bareos poetry --ansi run molecule $DEBUG_OPT $VERB_OPT test env: PY_COLORS: '1' diff --git a/roles/bareos/molecule/default/molecule.yml b/roles/bareos/molecule/default/molecule.yml index f3f25cf..6a4fe5e 100644 --- a/roles/bareos/molecule/default/molecule.yml +++ b/roles/bareos/molecule/default/molecule.yml @@ -8,7 +8,8 @@ dependency: # To switch on old Ansible Galaxy API (ansible < 2.13.5): # https://forum.ansible.com/t/os-builds-failing-skipping-galaxy-server-https-galaxy-ansible-com-api/1408/9 env: - GALAXY_SERVER_TIMEOUT: 300 + ANSIBLE_GALAXY_SERVER_TIMEOUT: 300 + ANSIBLE_GALAXY_SERVER_LIST: https://galaxy.ansible.com, https://old-galaxy.ansible.com driver: name: docker platforms: