--- # Copyright Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. - name: Run HCI common tasks ansible.builtin.import_tasks: common.yml - name: Load parameters ansible.builtin.include_tasks: load_parameters.yml when: not cifmw_hci_prepare_skip_load_parameters | bool - name: Ensure the kustomizations dirs exists ansible.builtin.file: path: "{{ cifmw_hci_prepare_dataplane_dir }}" state: directory mode: "0755" - name: Prepare EDPM network for HCI deployment when: - cifmw_hci_prepare_enable_storage_mgmt ansible.builtin.copy: mode: "0644" dest: "{{ cifmw_hci_prepare_dataplane_dir }}/89-storage-mgmt-kustomization.yaml" content: |- apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: namespace: {{ _cifmw_hci_prepare_namespace }} patches: - target: kind: OpenStackDataPlaneNodeSet patch: |- {% for compute_node in groups['computes'] %} - op: add path: /spec/nodes/edpm-{{ compute_node }}/networks/- value: name: StorageMgmt subnetName: subnet1 {% endfor %} - name: Enable services needed to deploy Ceph ansible.builtin.copy: mode: "0644" dest: "{{ cifmw_hci_prepare_dataplane_dir }}/88-hci-pre-kustomization.yaml" content: |- apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: namespace: {{ _cifmw_hci_prepare_namespace }} patches: - target: kind: OpenStackDataPlaneNodeSet patch: |- - op: replace path: /spec/services value: {% if cifmw_hci_prepare_enable_repo_setup_service|bool %} - repo-setup {% endif %} - bootstrap - configure-network - validate-network - install-os - ceph-hci-pre - configure-os - ssh-known-hosts - run-os - reboot-os - name: Disable discover_hosts when deploying hci on phase1 ansible.builtin.set_fact: cifmw_edpm_deploy_skip_nova_discover_hosts: true