|
| 1 | +--- |
| 2 | +- name: Create hotstack scenario |
| 3 | + hosts: hotstack |
| 4 | + vars: |
| 5 | + hotstack_work_dir: "{{ ansible_user_dir }}/hotstack" |
| 6 | + tasks: |
| 7 | + |
| 8 | + - name: Fetch bootstrap vars from remote to zuul executor |
| 9 | + ansible.builtin.fetch: |
| 10 | + src: "{{ scenario_dir }}/{{ scenario }}/bootstrap_vars.yml" |
| 11 | + dest: "{{ zuul.executor.work_root }}/bootstrap_vars.yml" |
| 12 | + flat: true |
| 13 | + |
| 14 | + - name: Load bootstrap vars with template resolution |
| 15 | + ansible.builtin.include_vars: |
| 16 | + file: "{{ zuul.executor.work_root }}/bootstrap_vars.yml" |
| 17 | + name: bootstrap_vars |
| 18 | + |
| 19 | + - name: Fetch test operator automation vars from remote to zuul executor |
| 20 | + ansible.builtin.fetch: |
| 21 | + src: "{{ bootstrap_vars.test_operator_automation_vars_file }}" |
| 22 | + dest: "{{ zuul.executor.work_root }}/{{ bootstrap_vars.test_operator_automation_vars_file | basename }}" |
| 23 | + flat: true |
| 24 | + |
| 25 | + - name: Load test operator automation vars with template resolution |
| 26 | + ansible.builtin.include_vars: |
| 27 | + file: "{{ zuul.executor.work_root }}/{{ bootstrap_vars.test_operator_automation_vars_file | basename }}" |
| 28 | + name: test_operator_automation_vars |
| 29 | + |
| 30 | + - name: Fetch stack outputs from remote to zuul executor |
| 31 | + no_log: true |
| 32 | + ansible.builtin.fetch: |
| 33 | + src: "{{ hotstack_work_dir }}/hs-{{ zuul.build }}-outputs.yaml" |
| 34 | + dest: "{{ zuul.executor.work_root }}/hs-{{ zuul.build }}-outputs.yaml" |
| 35 | + flat: true |
| 36 | + |
| 37 | + - name: Load stack output vars with template resolution |
| 38 | + no_log: true |
| 39 | + ansible.builtin.include_vars: |
| 40 | + file: "{{ zuul.executor.work_root }}/hs-{{ zuul.build }}-outputs.yaml" |
| 41 | + name: stack_outputs |
| 42 | + |
| 43 | + - name: Add Hotstack controller-0 to ansible inventory |
| 44 | + no_log: true |
| 45 | + ansible.builtin.add_host: "{{ stack_outputs.controller_ansible_host }}" |
| 46 | + |
| 47 | + - name: Wait for Hotstack controller-0 to be ready |
| 48 | + no_log: true |
| 49 | + delegate_to: "{{ stack_outputs.controller_ansible_host.name }}" |
| 50 | + ansible.builtin.wait_for_connection: |
| 51 | + delay: 5 |
| 52 | + timeout: 300 |
| 53 | + |
| 54 | + - name: Run scenario test automation |
| 55 | + vars: |
| 56 | + work_dir: "{{ scenario_dir }}/{{ scenario }}/test-operator" |
| 57 | + automation: "{{ test_operator_automation_vars }}" |
| 58 | + ansible.builtin.include_role: |
| 59 | + name: hotloop |
| 60 | + apply: |
| 61 | + delegate_to: controller-0 |
0 commit comments