Zack Williams | 3c28257 | 2018-01-29 14:41:28 -0700 | [diff] [blame] | 1 | --- |
| 2 | # Copyright 2017-present Open Networking Foundation |
| 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 | # cord-helm-charts/tasks/main.yml |
| 17 | # Creates Helm charts for CORD services |
| 18 | |
| 19 | - name: Create cord_profile/helm directory and chart subdirectories |
| 20 | file: |
| 21 | dest: "{{ config_cord_helm_dir }}" |
| 22 | state: directory |
| 23 | mode: 0755 |
| 24 | owner: "{{ ansible_user_id }}" |
| 25 | group: "{{ ansible_user_gid }}" |
| 26 | |
| 27 | - name: Create chart subdirectories |
| 28 | file: |
| 29 | dest: "{{ config_cord_helm_dir }}/{{ item }}" |
| 30 | state: directory |
| 31 | mode: 0755 |
| 32 | owner: "{{ ansible_user_id }}" |
| 33 | group: "{{ ansible_user_gid }}" |
| 34 | with_items: |
| 35 | - "xos-core" |
| 36 | - "xos-core/templates" |
| 37 | - "xos-services" |
| 38 | - "xos-services/templates" |
| 39 | |
| 40 | - name: Copy XOS Core templates |
| 41 | copy: |
| 42 | src: "core_templates/" |
| 43 | dest: "{{ config_cord_helm_dir }}/xos-core/templates/" |
| 44 | mode: 0755 |
| 45 | owner: "{{ ansible_user_id }}" |
| 46 | group: "{{ ansible_user_gid }}" |
| 47 | |
| 48 | - name: Create chart configuration from templates |
| 49 | template: |
| 50 | src: "{{ item }}.j2" |
| 51 | dest: "{{ config_cord_helm_dir }}/xos-core/{{ item }}" |
| 52 | mode: 0755 |
| 53 | owner: "{{ ansible_user_id }}" |
| 54 | group: "{{ ansible_user_gid }}" |
| 55 | with_items: |
| 56 | - Chart.yaml |
| 57 | - values.yaml |
| 58 | |