ansible-role-refstack-client/tasks/main.yaml
Martin Kopec 3a3fb4f48b Fix linters python3.10 issues
Bump the version of ansible-lint and fix all warnings and failures
found by ansible-lint.
Also remove any python2 related code/tasks from
install-packages.yaml

Change-Id: If466227fb9872f1112b4577670c891bef5b31627
2023-06-22 00:08:33 +02:00

46 lines
1.5 KiB
YAML

---
- name: Install required packages
ansible.builtin.include_tasks: install-packages.yaml
- ansible.builtin.include_tasks: install-refstack-client.yaml
- name: Generate accounts.yaml file
ansible.builtin.include_tasks: generate-accounts.yaml
when: accounts_path is not defined
- name: Set path to provided accounts.yaml
ansible.builtin.set_fact:
path_to_accounts_file: "{{ accounts_path }}"
when: accounts_path is defined
- name: Generate tempest.conf file
ansible.builtin.include_tasks: generate-tempestconf.yaml
when: tempest_config_path is not defined
- name: Set path to provided tempest.conf
ansible.builtin.set_fact:
path_to_tempest_config: "{{ tempest_config_path }}"
when: tempest_config_path is defined
- ansible.builtin.include_tasks: run-refstack-client.yaml
- ansible.builtin.include_tasks: post-tasks.yaml
when: upload_results | bool or download_artifacts | bool
- when: test_list is defined
block:
- name: Check if we passed refstack tests
ansible.builtin.fail:
msg: "Refstack tests failed."
# the refstack_result var got set in run-refstack-client.yaml
when: refstack_result.rc > 0
- when: test_list is not defined
block:
- name: Check if we passed tests of all specified target programs
ansible.builtin.fail:
msg: "Refstack tests failed."
# the refstack_results var got set in run-refstack-client.yaml
when: item.rc > 0
with_items: "{{ refstack_results.results }}"