bm onboard fix
[ta/caas-lcm.git] / su / roles / su_prepare / tasks / merge-images.yml
1 ---
2 # Copyright 2019 Nokia
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 - name: List all the image repo in the new registry
17   shell: curl --cert /etc/docker-update-registry/update-registry.pem --key /etc/docker-update-registry/update-registry-key.pem --cacert /etc/docker-update-registry/ca.pem {{ caas.update_registry }}/v2/_catalog
18   register: ret_repo_in_new_registry
19
20 # Tags may different between images. So we get tag for each image in script.
21 - name: Merge new images to original registry
22   shell: "{{ caas.libexec_dir }}/merge_image.sh --from-registry={{ caas.update_registry_url }}:{{ caas.update_registry_port }} --to-registry={{ caas.registry_url }}:{{ caas.registry_port }} {{ ret_repo_in_new_registry.stdout }}"