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
8 # http://www.apache.org/licenses/LICENSE-2.0
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.
16 - name: Chart repo handler template
19 dest: "{{ caas.manifests_directory }}/chart-repo.yml"
21 - name: Chart repo service template
23 src: "chart-repo_service.yml"
24 dest: "{{ caas.manifests_directory }}/chart-repo_service.yml"
26 - name: Authenticate into swift
27 shell: 'curl -XGET -i -H"X-Auth-User:{{ caas.swift_credential.tenant }}:{{ caas.swift_credential.user }}" -H"X-Auth-Key:{{ caas.swift_credential.password }}" {{ caas.swift }}/auth/v1.0 | grep X-Auth-Token: | awk "{ print \$2 }"'
28 register: SWIFT_AUTH_KEY
30 - name: Create packages folder/container into swift
31 shell: 'curl -XPUT -H"X-Auth-Token: {{ SWIFT_AUTH_KEY.stdout }}" {{ caas.swift }}/v1.0/AUTH_admin/packages'
33 - name: Read the swift main folder/container and check if is there the packages folder/conatiner
34 shell: 'curl -XGET -H"X-Auth-Token: {{ SWIFT_AUTH_KEY.stdout }}" {{ caas.swift }}/v1.0/AUTH_admin | grep packages'
36 - name: start chart repo handler
38 manifest: "{{ caas.manifests_directory }}/chart-repo.yml"
41 - name: start chart repo service
43 manifest: "{{ caas.manifests_directory }}/chart-repo_service.yml"