Make collections installation more reliable
Installing collections with ansible-galaxy is causing a large number of CI job failures [1]. This patch switches collections installation to github from galaxy for supported collections, and adding retry for task itself. [1] http://paste.openstack.org/show/799081/ Change-Id: Ib61be19b815882ec2167d452b78565ea78c5284c
This commit is contained in:
parent
5c37076ba1
commit
77bb885d07
@ -1,19 +1,21 @@
|
||||
collections:
|
||||
# NOTE(noonedeadpunk): needs galaxy.yml to be able to pull from git
|
||||
- name: openstack.cloud
|
||||
version: 1.0.0
|
||||
version: 1.2.0
|
||||
source: https://galaxy.ansible.com
|
||||
- name: community.general
|
||||
version: 1.1.0
|
||||
source: https://galaxy.ansible.com
|
||||
- name: community.rabbitmq
|
||||
- name: https://github.com/ansible-collections/community.general
|
||||
version: 1.2.0
|
||||
type: git
|
||||
- name: https://github.com/ansible-collections/community.rabbitmq
|
||||
version: 1.0.1
|
||||
source: https://galaxy.ansible.com
|
||||
- name: community.mysql
|
||||
version: 1.0.0
|
||||
source: https://galaxy.ansible.com
|
||||
- name: community.crypto
|
||||
version: 1.1.1
|
||||
source: https://galaxy.ansible.com
|
||||
type: git
|
||||
- name: https://github.com/ansible-collections/community.mysql
|
||||
version: 1.1.0
|
||||
type: git
|
||||
- name: https://github.com/ansible-collections/community.crypto
|
||||
version: 1.2.0
|
||||
type: git
|
||||
# NOTE(noonedeadpunk): needs version in galaxy.yml to pull from git
|
||||
- name: openvswitch.openvswitch
|
||||
version: 1.0.5
|
||||
source: https://galaxy.ansible.com
|
||||
|
@ -22,7 +22,7 @@ set -e -u -x
|
||||
export HTTP_PROXY=${HTTP_PROXY:-""}
|
||||
export HTTPS_PROXY=${HTTPS_PROXY:-""}
|
||||
# The Ansible version used for testing
|
||||
export ANSIBLE_PACKAGE=${ANSIBLE_PACKAGE:-"ansible-base==2.10.1"}
|
||||
export ANSIBLE_PACKAGE=${ANSIBLE_PACKAGE:-"ansible-base==2.10.2"}
|
||||
export ANSIBLE_ROLE_FILE=${ANSIBLE_ROLE_FILE:-"ansible-role-requirements.yml"}
|
||||
export ANSIBLE_COLLECTION_FILE=${ANSIBLE_COLLECTION_FILE:-"ansible-collection-requirements.yml"}
|
||||
export USER_ROLE_FILE=${USER_ROLE_FILE:-"user-role-requirements.yml"}
|
||||
|
@ -53,10 +53,13 @@
|
||||
|
||||
- name: Install collection requirements with ansible galaxy
|
||||
command: >
|
||||
/opt/ansible-runtime/bin/ansible-galaxy collection install
|
||||
/opt/ansible-runtime/bin/ansible-galaxy collection install --force
|
||||
-r "{{ collection_requirements_tmpfile.path }}"
|
||||
-p "{{ collection_path_default }}"
|
||||
register: collection_install
|
||||
until: collection_install is success
|
||||
retries: 5
|
||||
delay: 2
|
||||
|
||||
- name: Show collection install output
|
||||
debug: msg="{{ collection_install.stdout.split('\n') }}"
|
||||
|
Loading…
Reference in New Issue
Block a user