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: create Danm CRD APIs in K8s
18 manifest: "{{ item }}"
20 with_fileglob: "{{ caas.danm_crd_dir }}/*"
24 crd_name: "{{ lookup('file', item) | from_yaml | json_query('spec.names.plural') }}"
25 with_fileglob: "{{ caas.danm_crd_dir }}/*"
26 register: created_crds
28 - name: wait and check Danm CRD availability
29 shell: "kubectl api-resources | grep {{ item.ansible_facts.crd_name }} | wc -l"
31 until: crd_result.stdout == "1"
34 with_items: "{{ created_crds.results }}"
36 - name: create tenant config
37 include_tasks: danm-tenant-configs.yaml