Create tempest related directories from ansible user

Currently tempest related directories are created by root, which
makes the os_tempest needs to be runned as root which is
dangerous.

This changes allows to create the tempest related directories
as a normal user and use root user/owner where it is need in
the userspace.

Change-Id: I698495bdf915d108dc3978d898fb802e12ef1c96
This commit is contained in:
Chandan Kumar 2019-02-28 17:00:20 +05:30
parent d333065635
commit c01f3a2558

View File

@ -18,14 +18,17 @@
file:
path: "{{ item.path }}"
state: directory
owner: "root"
group: "root"
owner: "{{ item.owner | default(omit) }}"
group: "{{ item.group | default(omit) }}"
mode: "{{ item.mode|default('0755') }}"
with_items:
- path: "{{ tempest_log_dir | realpath }}"
owner: root
- path: "{{ tempest_image_dir }}"
- path: "{{ tempest_workspace }}"
- path: "/etc/tempest"
owner: root
group: root
- name: Copy tempest config
config_template: