mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-06-11 19:25:54 +00:00
upstream ci: Allow tasks to retry in case of connection failure.
Some tasks used to setup Azure environment might fail to temporary errors like timeouts and connection failures. Allowing the tasks to retry a few times will allow the test to be correctly executed rather than returning an error that is not related to the feature tested.
This commit is contained in:
@@ -34,20 +34,25 @@ jobs:
|
||||
pip install \
|
||||
"molecule[docker]>=3" \
|
||||
"ansible${{ parameters.ansible_version }}"
|
||||
retryCountOnTaskFailure: 5
|
||||
displayName: Install molecule and Ansible
|
||||
|
||||
- script: ansible-galaxy collection install community.docker ansible.posix
|
||||
retryCountOnTaskFailure: 5
|
||||
displayName: Install Ansible collections
|
||||
|
||||
- script: pip install -r requirements-tests.txt
|
||||
retryCountOnTaskFailure: 5
|
||||
displayName: Install dependencies
|
||||
|
||||
- script: |
|
||||
rm -rf ~/ansible
|
||||
mkdir -p ~/.ansible/roles ~/.ansible/library ~/.ansible/module_utils
|
||||
cp -a roles/* ~/.ansible/roles
|
||||
cp -a plugins/modules/* ~/.ansible/library
|
||||
cp -a plugins/module_utils/* ~/.ansible/module_utils
|
||||
molecule create -s ${{ parameters.scenario }}
|
||||
retryCountOnTaskFailure: 5
|
||||
displayName: Setup test container
|
||||
env:
|
||||
ANSIBLE_LIBRARY: ./molecule
|
||||
|
||||
Reference in New Issue
Block a user