ansible-role-refstack-client/tasks/generate-tempestconf.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

48 lines
1.6 KiB
YAML

---
- when: "'shared_file_system' in refstack_target_programs"
block:
- name: Copy python script for parsing tempest.conf
ansible.builtin.copy:
src: parse_ini_get_tempestconf_overrides.py
dest: "{{ refstack_client_source }}/parse_ini_get_tempestconf_overrides.py"
- name: Parse share config from tempest_admin.conf
ansible.builtin.shell: |
python3 ./parse_ini_get_tempestconf_overrides.py \
backend_names,enable_protocols,multitenancy_enabled \
share \
etc/tempest_admin.conf
register: share_tempestconf_overrides
args:
chdir: "{{ refstack_client_source }}"
- name: Form share overrides for tempestconf
ansible.builtin.set_fact:
share_tempestconf_overrides: "{{ share_tempestconf_overrides.stdout_lines }}"
- name: Generate tempest configuration script
ansible.builtin.template:
src: generate-tempestconf.sh.j2
dest: "{{ refstack_client_source }}/generate-tempestconf.sh"
mode: 0744
- name: Generate tempest configuration file
ansible.builtin.shell: |
./generate-tempestconf.sh
args:
chdir: "{{ refstack_client_source }}"
executable: /bin/bash
changed_when: tempest_config_path is not defined
- name: Cat generated tempest.conf file
ansible.builtin.shell: |
cat ./etc/tempest.conf
args:
executable: /bin/bash
chdir: "{{ refstack_client_source }}"
changed_when: false
- name: Set path to newly generated tempest.conf
ansible.builtin.set_fact:
path_to_tempest_config: "{{ refstack_client_source }}/etc/tempest.conf"