|
| 1 | +--- |
| 2 | +- name: Manage unique ID |
| 3 | + ansible.builtin.import_playbook: playbooks/unique-id.yml |
| 4 | + |
| 5 | +- name: Reproducer prepare play |
| 6 | + hosts: "{{ cifmw_target_host | default('localhost') }}" |
| 7 | + gather_facts: true |
| 8 | + pre_tasks: |
| 9 | + - name: Prepare cleanup script |
| 10 | + ansible.builtin.include_role: |
| 11 | + name: reproducer |
| 12 | + tasks_from: configure_cleanup.yaml |
| 13 | + |
| 14 | + - name: Run Openstack cleanup |
| 15 | + no_log: "{{ cifmw_nolog | default(true) | bool }}" |
| 16 | + async: "{{ 7200 + cifmw_test_operator_timeout | default(3600) }}" # 2h should be enough to deploy EDPM and rest for tests. |
| 17 | + poll: 20 |
| 18 | + delegate_to: controller-0 |
| 19 | + ansible.builtin.command: |
| 20 | + cmd: "/home/zuul/cleanup-architecture.sh" |
| 21 | + |
| 22 | + - name: Inherit from parent scenarios if needed |
| 23 | + ansible.builtin.include_tasks: |
| 24 | + file: "ci/playbooks/tasks/inherit_parent_scenario.yml" |
| 25 | + |
| 26 | + - name: Include common architecture parameter file |
| 27 | + when: |
| 28 | + - cifmw_architecture_scenario is defined |
| 29 | + - cifmw_architecture_scenario | length > 0 |
| 30 | + ansible.builtin.include_vars: |
| 31 | + file: "scenarios/reproducers/va-common.yml" |
| 32 | + |
| 33 | + - name: Run reproducer validations |
| 34 | + ansible.builtin.import_role: |
| 35 | + name: reproducer |
| 36 | + tasks_from: validations |
| 37 | + |
| 38 | + - name: Gather OS facts |
| 39 | + ansible.builtin.setup: |
| 40 | + gather_subset: |
| 41 | + - "!all" |
| 42 | + - "!min" |
| 43 | + - "distribution" |
| 44 | + |
| 45 | + - name: Tweak dnf configuration |
| 46 | + become: true |
| 47 | + community.general.ini_file: |
| 48 | + no_extra_spaces: true |
| 49 | + option: "{{ config.option }}" |
| 50 | + path: "/etc/dnf/dnf.conf" |
| 51 | + section: "{{ config.section | default('main') }}" |
| 52 | + state: "{{ config.state | default(omit) }}" |
| 53 | + value: "{{ config.value | default(omit) }}" |
| 54 | + mode: "0644" |
| 55 | + loop: "{{ cifmw_reproducer_dnf_tweaks }}" |
| 56 | + loop_control: |
| 57 | + label: "{{ config.option }}" |
| 58 | + loop_var: 'config' |
| 59 | + |
| 60 | + - name: Install custom CA if needed |
| 61 | + ansible.builtin.import_role: |
| 62 | + name: install_ca |
| 63 | + |
| 64 | + - name: Setup repositories via rhos-release if needed |
| 65 | + tags: |
| 66 | + - packages |
| 67 | + when: |
| 68 | + - ansible_facts['distribution'] == 'RedHat' |
| 69 | + - cifmw_reproducer_hp_rhos_release | bool |
| 70 | + vars: |
| 71 | + cifmw_repo_setup_output: /etc/yum.repos.d |
| 72 | + cifmw_repo_setup_rhos_release_args: "rhel" |
| 73 | + ansible.builtin.import_role: |
| 74 | + name: repo_setup |
| 75 | + tasks_from: rhos_release |
| 76 | + |
| 77 | + roles: |
| 78 | + - role: ci_setup |
| 79 | + |
| 80 | +- name: Prepare switches |
| 81 | + vars: |
| 82 | + cifmw_configure_switches: "{{ 'switches' in groups }}" |
| 83 | + ansible.builtin.import_playbook: playbooks/switches_config.yml |
| 84 | + |
| 85 | +- name: Reproducer reuse run |
| 86 | + hosts: "{{ cifmw_target_host | default('localhost') }}" |
| 87 | + gather_facts: false |
| 88 | + tasks: |
| 89 | + - name: Run reproducer reuse playbook |
| 90 | + ansible.builtin.include_role: |
| 91 | + name: reproducer |
| 92 | + tasks_from: reuse_main |
| 93 | + |
| 94 | + - name: Run deployment if instructed to |
| 95 | + when: |
| 96 | + - cifmw_deploy_architecture | default(false) | bool |
| 97 | + no_log: "{{ cifmw_nolog | default(true) | bool }}" |
| 98 | + async: "{{ 7200 + cifmw_test_operator_timeout | default(3600) }}" # 2h should be enough to deploy EDPM and rest for tests. |
| 99 | + poll: 20 |
| 100 | + delegate_to: controller-0 |
| 101 | + ansible.builtin.command: |
| 102 | + cmd: "/home/zuul/deploy-architecture.sh {{ cifmw_deploy_architecture_args | default('') }}" |
0 commit comments