Only add a comma before multiple update repos

When adding repos to update in standalone
and undercloud, only add a comma before the list
of additional repos if a previous update repos
exist.

Change-Id: Ic1568c99e16eecd607f063fe8a95fa8c4aa9ed2b
This commit is contained in:
Ronelle Landy 2021-05-20 15:13:54 -04:00
parent 8f5db177cd
commit da5514a356
2 changed files with 4 additions and 2 deletions

View File

@ -212,7 +212,8 @@
- name: Create string from list
set_fact:
add_repos_update: ",{{ add_repos_update | join(',') }}"
add_repos_update:
"{% if standalone_container_prep_update_repo|length >0 %},{% endif %}{{ add_repos_update | join(',') }}"
when: add_repos_update|length > 0
- name: Load the container params file data

View File

@ -129,7 +129,8 @@
- name: Create string from list
set_fact:
add_repos_update: ",{{ add_repos_update | join(',') }}"
add_repos_update:
"{% if update_containers_repo|length >0 %},{% endif %}{{ add_repos_update | join(',') }}"
when: add_repos_update|length > 0
- name: Create string from list