Prevent bootstrap failure when all roles/collections are overriden
At the moment we assume that scenario when all roles or collections provided by ansible-role/collection-requirements won't be overwritten. As if they do, previous set_fact will be skipped and galaxy_collections_list/clone_roles will remain undefined. To avoid failure and to allow to fully override roles/collections we define default for the task that aims to merge default items with user-provided ones. Change-Id: I86d44499073f0571a529d81ed3be713996e5f339
This commit is contained in:
parent
bdfa671030
commit
63363abdbf
@ -42,7 +42,7 @@
|
||||
|
||||
- name: Append user collections to filtered required collections
|
||||
set_fact:
|
||||
galaxy_collections_list: "{{ galaxy_collections_list + [ item ] }}"
|
||||
galaxy_collections_list: "{{ (galaxy_collections_list | default([])) + [ item ] }}"
|
||||
with_items: "{{ user_collections.collections }}"
|
||||
when:
|
||||
- user_collections.collections is defined
|
||||
|
@ -132,7 +132,7 @@
|
||||
|
||||
- name: Append user overridden roles
|
||||
set_fact:
|
||||
clone_roles: "{{ clone_roles + user_roles }}"
|
||||
clone_roles: "{{ (clone_roles | default([])) + user_roles }}"
|
||||
|
||||
- name: Clone git repos
|
||||
block:
|
||||
|
Loading…
Reference in New Issue
Block a user