--- # Entry point for the CI Framework tool. # Running by this playbook, and providing the needed information, you will # be able to deploy various scenarios based on EDPM. # Note that this playbook *must* be called from within # openstack-k8s-operators/install_yaml repository in order to leverage its # own methods. - name: Remove status flag hosts: "{{ cifmw_target_host | default('localhost') }}" tasks: - name: Delete success flag if exists ansible.builtin.file: path: "{{ ansible_user_dir }}/cifmw-success" state: absent - name: Inherit from parent scenarios if needed ansible.builtin.include_tasks: file: "ci/playbooks/tasks/inherit_parent_scenario.yml" - name: Run bootstrap ansible.builtin.import_role: name: cifmw_setup tasks_from: bootstrap.yml - name: Run pre_infra hooks vars: step: pre_infra ansible.builtin.import_role: name: run_hook tags: - infra - name: Prepare host virtualization hosts: "{{ ('virthosts' in groups) | ternary('virthosts', cifmw_target_host | default('localhost') ) }}" tasks: - name: Run prepare host virtualization vars: step: pre_infra ansible.builtin.import_role: name: cifmw_setup tasks_from: host_virtualization.yml tags: - infra - name: Run cifmw_setup infra, build package, container and operators, deploy EDPM hosts: "{{ cifmw_target_host | default('localhost') }}" tasks: - name: Prepare the platform vars: step: pre_infra ansible.builtin.import_role: name: cifmw_setup tasks_from: infra.yml tags: - infra - name: Build package playbook ansible.builtin.import_role: name: cifmw_setup tasks_from: build_packages.yml tags: - build-packages - name: Build container playbook ansible.builtin.import_role: name: cifmw_setup tasks_from: build_containers.yml tags: - build-containers - name: Build operators playbook ansible.builtin.import_role: name: cifmw_setup tasks_from: build_operators.yml tags: - build-operators environment: PATH: "{{ cifmw_path }}" - name: Deploy EDPM ansible.builtin.import_role: name: cifmw_setup tasks_from: deploy_edpm.yml tags: - edpm - name: Deploy NFS server on target nodes become: true gather_facts: false hosts: "{{ groups[cifmw_nfs_target | default('computes')][0] | default([]) }}" tasks: - name: End play early for architecture deploys when: - cifmw_architecture_scenario is defined ansible.builtin.meta: end_play - name: Run cifmw_nfs role vars: nftables_path: /etc/nftables nftables_conf: /etc/sysconfig/nftables.conf when: - cifmw_edpm_deploy_nfs | default(false) | bool ansible.builtin.import_role: name: cifmw_nfs - name: Clear ceph target hosts facts to force refreshing in HCI deployments gather_facts: false hosts: "{{ cifmw_ceph_target | default('computes') }}" tasks: - name: Early end if architecture deploy when: - cifmw_architecture_scenario is defined ansible.builtin.meta: end_play - name: Clear ceph target hosts facts when: cifmw_edpm_deploy_hci | default(false) | bool ansible.builtin.meta: clear_facts - name: Deploy ceph using hooks hosts: "{{ cifmw_target_host | default('localhost') }}" tasks: - name: Run post_ceph hooks - deploy Ceph on target nodes vars: step: post_ceph _deploy_ceph: >- {{ (cifmw_edpm_deploy_hci | default(false) | bool) and cifmw_architecture_scenario is undefined }} storage_network_range: 172.18.0.0/24 storage_mgmt_network_range: 172.20.0.0/24 ansible.builtin.import_role: name: run_hook - name: Continue HCI deploy, deploy architecture and validate workflow hosts: "{{ cifmw_target_host | default('localhost') }}" gather_facts: false tasks: - name: Continue HCI deploy ansible.builtin.import_role: name: cifmw_setup tasks_from: hci_deploy.yml tags: - edpm - name: Run pre_deploy hooks when: cifmw_architecture_scenario is defined vars: step: pre_deploy ansible.builtin.import_role: name: run_hook - name: Early end if not architecture deploy tags: - always when: cifmw_architecture_scenario is not defined ansible.builtin.meta: end_play - name: Run cifmw_setup deploy_architecture when: cifmw_architecture_scenario is defined ansible.builtin.import_role: name: cifmw_setup tasks_from: deploy_architecture.yml tags: - edpm - name: Run validations ansible.builtin.include_role: name: validations when: cifmw_execute_validations | default(false) | bool