Use full paths to projects in the playbook

Let's use full paths to the projects cloned by zuul
It will help to set path_to_tempest_config and
path_to_accounts_file to full paths as well. Currently
they contained just relative paths (relative to the
refstack-client's source) which has been causing problems
in the post_tasks as fetch doesn't work reliably with
ansible chdir option.

Change-Id: I062ca182c30c9916d2a17c44f29bc85cec81db94
This commit is contained in:
Martin Kopec 2020-12-21 16:42:47 +00:00
parent 05461ccfb6
commit 56698291b1
4 changed files with 4 additions and 11 deletions

View File

@ -23,11 +23,8 @@
- name: Run ansible-role-refstack-client
include_tasks: ../tasks/main.yaml
vars:
refstack_client_source: "{{ zuul.projects['opendev.org/osf/refstack-client'].src_dir }}"
# the task which installs refstack-client changes dir to the refstack-client's
# location, python-tempestconf is in the same org (osf) so it's cloned
# just one level up by the zuul
tempestconf_source: "../python-tempestconf"
refstack_client_source: "/home/zuul/{{ zuul.projects['opendev.org/osf/refstack-client'].src_dir }}"
tempestconf_source: "/home/zuul/{{ zuul.projects['opendev.org/osf/python-tempestconf']. src_dir }}"
source_credentials: "{{ devstack_base_dir }}/devstack/openrc demo demo"
source_admin_credentials: "{{ devstack_base_dir }}/devstack/openrc admin admin"
additional_tempestconf_params: "auth.tempest_roles Member object-storage.operator_role Member"

View File

@ -65,4 +65,4 @@
- name: Set path to newly generated accounts.yaml
set_fact:
path_to_accounts_file: "./etc/accounts.yaml"
path_to_accounts_file: "{{ refstack_client_source }}/etc/accounts.yaml"

View File

@ -23,4 +23,4 @@
- name: Set path to newly generated tempest.conf
set_fact:
path_to_tempest_config: "./etc/tempest.conf"
path_to_tempest_config: "{{ refstack_client_source }}/etc/tempest.conf"

View File

@ -69,13 +69,9 @@
src: "{{ path_to_tempest_config }}"
dest: "{{ dest_dir }}/tempest.conf"
flat: true
args:
chdir: "{{ refstack_client_source }}"
- name: Download accounts.yaml file
fetch:
src: "{{ path_to_accounts_file }}"
dest: "{{ dest_dir }}/accounts.yaml"
flat: true
args:
chdir: "{{ refstack_client_source }}"