
Currently the "Generate tempest accounts.yaml file" task uses tempest that was installed as a dependency for python-tempestconf. If we want to propagate fixes for account-generator more quickly into the ansible-role-refstack-client it would probably be better to use tempest installed by setup_env (we do not have to wait for another tempest release in pypi). Change-Id: I2a3cdca3b2b26946d6e5f910527ad1c7ada9b202
75 lines
2.1 KiB
YAML
75 lines
2.1 KiB
YAML
---
|
|
- name: Generate tempest_admin.conf as admin
|
|
shell: |
|
|
set -ex
|
|
source .venv/bin/activate
|
|
source {{ source_admin_credentials }}
|
|
discover-tempest-config \
|
|
--debug \
|
|
-v \
|
|
--create \
|
|
--image {{ url_cirros_image }} \
|
|
--out ./etc/tempest_admin.conf
|
|
args:
|
|
executable: /bin/bash
|
|
chdir: "{{ refstack_client_source }}"
|
|
when: additional_tempestconf_params is not defined
|
|
|
|
- name: Generate tempest_admin.conf as admin additional params
|
|
shell: |
|
|
set -ex
|
|
source .venv/bin/activate
|
|
source {{ source_admin_credentials }}
|
|
discover-tempest-config \
|
|
--debug \
|
|
-v \
|
|
--create \
|
|
--image {{ url_cirros_image }} \
|
|
--out ./etc/tempest_admin.conf \
|
|
{{ additional_tempestconf_params }}
|
|
args:
|
|
executable: /bin/bash
|
|
chdir: "{{ refstack_client_source }}"
|
|
when: additional_tempestconf_params is defined
|
|
|
|
- name: Cat generated tempest_admin.conf file
|
|
shell: |
|
|
cat ./etc/tempest_admin.conf
|
|
args:
|
|
executable: /bin/bash
|
|
chdir: "{{ refstack_client_source }}"
|
|
changed_when: false
|
|
|
|
- name: Set path to tempest_admin.conf
|
|
set_fact:
|
|
path_to_admin_tempest_config: "{{ refstack_client_source }}/etc/tempest_admin.conf"
|
|
|
|
- name: Generate tempest accounts.yaml file
|
|
shell: |
|
|
set -ex
|
|
export PATH=$PATH:/usr/local/sbin:/usr/sbin
|
|
source .tempest/.venv/bin/activate
|
|
source {{ source_admin_credentials }}
|
|
printenv
|
|
tempest account-generator \
|
|
--config-file ./etc/tempest_admin.conf \
|
|
--concurrency {{ tempest_account_concurrency }} \
|
|
{{ '"shared_file_system" in refstack_target_programs' | ternary('--with-admin', '') }} \
|
|
./etc/accounts.yaml
|
|
args:
|
|
executable: /bin/bash
|
|
chdir: "{{ refstack_client_source }}"
|
|
changed_when: accounts_path is not defined
|
|
|
|
- name: Cat generated accounts.yaml file
|
|
shell: |
|
|
cat ./etc/accounts.yaml
|
|
args:
|
|
executable: /bin/bash
|
|
chdir: "{{ refstack_client_source }}"
|
|
changed_when: false
|
|
|
|
- name: Set path to newly generated accounts.yaml
|
|
set_fact:
|
|
path_to_accounts_file: "{{ refstack_client_source }}/etc/accounts.yaml"
|