2 # ============LICENSE_START=======================================================
3 # Copyright (C) 2019 The Nordix Foundation. All rights reserved.
4 # ================================================================================
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # SPDX-License-Identifier: Apache-2.0
18 # ============LICENSE_END=========================================================
20 - name: Load execution mode variables
21 include_vars: "{{ execution_mode }}.yaml"
23 - name: Delete existing rook cluster if any
25 definition: "{{ lookup('template', config_file) }}"
28 - external-dashboard-https.yaml.j2
30 - storageclass.yaml.j2
38 - name: Delete existing rook cluster CRD if any
40 api_version: apiextensions.k8s.io/v1beta1
42 kind: CustomResourceDefinition
43 name: cephclusters.ceph.rook.io
47 - name: Delete existing rook operator if any
49 definition: "{{ lookup('template', config_file) }}"
59 - name: Wait until rook namespace is deleted
62 name: "{{ rook_namespace }}"
64 until: not result.resources
69 - name: Create rook operator
72 definition: "{{ lookup('template', config_file) }}"
79 - name: Wait until OPERATOR pod is available
82 namespace: "{{ rook_namespace }}"
84 - app = rook-ceph-operator
86 - status.phase=Running
87 register: rook_mgr_status
89 - rook_mgr_status.resources is defined
90 - rook_mgr_status.resources
94 - name: Create rook cluster
97 definition: "{{ lookup('template', config_file) }}"
102 loop_var: config_file
104 - name: Wait until rook cluster deployment is complete
108 namespace: "{{ rook_namespace }}"
110 - status.state = "Created"
111 register: rook_cluster_status
113 - rook_cluster_status.resources
117 - name: Wait until MGR pods are available
120 namespace: "{{ rook_namespace }}"
122 - app = rook-ceph-mgr
124 - status.phase=Running
125 register: rook_mgr_status
127 - rook_mgr_status.resources is defined
128 - rook_mgr_status.resources
132 - name: Wait until OSD pods are available
135 namespace: "{{ rook_namespace }}"
137 - app = rook-ceph-osd
139 - status.phase=Running
140 register: rook_osd_status
142 - rook_osd_status.resources is defined
143 - rook_osd_status.resources
147 - name: Create rook block storage
150 definition: "{{ lookup('template', config_file) }}"
153 - storageclass.yaml.j2
155 loop_var: config_file
157 - name: Create rook file system
160 definition: "{{ lookup('template', config_file) }}"
163 - filesystem-storageclass.yaml.j2
165 loop_var: config_file
166 when: rook_filesystem|bool
168 - name: Create rook external dashboard
171 definition: "{{ lookup('template', 'external-dashboard-https.yaml.j2') }}"
173 # vim: set ts=2 sw=2 expandtab: