diff --git a/playbooks/pre-tobiko-devstack.yaml b/playbooks/pre-tobiko-devstack.yaml index 85997798e..f5caa847a 100644 --- a/playbooks/pre-tobiko-devstack.yaml +++ b/playbooks/pre-tobiko-devstack.yaml @@ -27,3 +27,6 @@ owner: stack group: stack become: yes + + roles: + - setup_tobiko_logs_dir diff --git a/roles/setup_tobiko_logs_dir/README.rst b/roles/setup_tobiko_logs_dir/README.rst new file mode 100644 index 000000000..eac635325 --- /dev/null +++ b/roles/setup_tobiko_logs_dir/README.rst @@ -0,0 +1,8 @@ +Configure tobiko logs directory to be accessible for ``stack`` user. + +**Role Variables** + +.. zuul:rolevar:: tobiko_logsdir + :default: /opt/stack/tobiko_logs + + Name of the directory where Tobiko configs will be stored. diff --git a/roles/setup_tobiko_logs_dir/defaults/main.yml b/roles/setup_tobiko_logs_dir/defaults/main.yml new file mode 100644 index 000000000..e451d7700 --- /dev/null +++ b/roles/setup_tobiko_logs_dir/defaults/main.yml @@ -0,0 +1 @@ +tobiko_logsdir: "/opt/stack/tobiko_logs" diff --git a/roles/setup_tobiko_logs_dir/tasks/main.yml b/roles/setup_tobiko_logs_dir/tasks/main.yml new file mode 100644 index 000000000..5d99abe0b --- /dev/null +++ b/roles/setup_tobiko_logs_dir/tasks/main.yml @@ -0,0 +1,8 @@ +- name: Ensure logdir exists + become: yes + file: + path: "{{ tobiko_logsdir }}" + state: directory + owner: stack + group: "{{ ansible_user }}" + mode: 0775 diff --git a/zuul.d/tobiko-devstack.yaml b/zuul.d/tobiko-devstack.yaml index 8bba52d9d..9542340d8 100644 --- a/zuul.d/tobiko-devstack.yaml +++ b/zuul.d/tobiko-devstack.yaml @@ -24,6 +24,7 @@ # TOBIKO_KEYSTONE_USERNAME: tobiko # TOBIKO_KEYSTONE_PASSWORD: secret_tobiko # TOBIKO_KEYSTONE_PROJECT_NAME: tobiko + TOBIKO_LOG_DIR: '{{ devstack_base_dir }}/tobiko_logs' devstack_plugins: heat: https://opendev.org/openstack/heat.git neutron: https://opendev.org/openstack/neutron.git @@ -70,9 +71,7 @@ min_compute_nodes: "{{ groups['compute'] | default(['controller']) | length }}" test_results_stage_name: test_results zuul_copy_output: - '{{ devstack_base_dir }}/tobiko/etc/tobiko.conf': logs - '{{ devstack_base_dir }}/tobiko/etc/accounts.yaml': logs - '{{ devstack_base_dir }}/tobiko/tobiko.log': logs + '{{ devstack_base_dir }}/tobiko_logs': logs '{{ stage_dir }}/{{ test_results_stage_name }}.subunit': logs '{{ stage_dir }}/{{ test_results_stage_name }}.html': logs '{{ stage_dir }}/stackviz': logs