ansible-role-refstack-client/tasks/generate-accounts.yaml

57 lines
1.4 KiB
YAML

---
- name: Generate tempest.conf as admin
shell: |
set -ex
source .venv/bin/activate
source {{ source_admin_credentials }}
discover-tempest-config \
--debug \
-v \
--create \
--out ./etc/tempest.conf
args:
executable: /bin/bash
chdir: "{{ refstack_client_source }}"
when: additional_tempestconf_params is not defined
- name: Generate tempest.conf as admin additional params
shell: |
set -ex
source .venv/bin/activate
source {{ source_admin_credentials }}
discover-tempest-config \
--debug \
-v \
--create \
--out ./etc/tempest.conf \
{{ additional_tempestconf_params }} \
image.http_image {{ url_cirros_image }}
args:
executable: /bin/bash
chdir: "{{ refstack_client_source }}"
when: additional_tempestconf_params is defined
- name: Generate tempest accounts.yaml file
shell: |
set -ex
export PATH=$PATH:/usr/local/sbin:/usr/sbin
source .venv/bin/activate
source {{ source_admin_credentials }}
printenv
tempest account-generator \
--config-file ./etc/tempest.conf \
--concurrency 3 \
./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