Add tempest workspace volume for tempest

* It also set proper setype for tempest service directories
This will allow proper access from the containers without any new SELinux policy.

* /var/lib/tempest will be used for creating tempest workspace.

Change-Id: Iedd397784c8b8d1bb891272542bd242c0ea60340
This commit is contained in:
Chandan Kumar 2018-10-03 16:04:41 +05:30
parent ae7beb716b
commit 9a1effd90d

View File

@ -52,16 +52,20 @@ outputs:
privileged: false
user: root
volumes:
- /var/log/containers/tempest:/var/log/tempest
command: ['/bin/bash', '-c', 'chown -R tempest:tempest /var/log/tempest']
- /var/log/containers/tempest:/var/log/tempest:z
- /var/lib/tempestdata:/var/lib/tempest:z
command: ['/bin/bash', '-c', 'chown -R tempest:tempest /var/log/tempest /var/lib/tempest']
host_prep_tasks:
- name: create persistent logs directory
file:
path: "{{ item }}"
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
with_items:
- /var/log/containers/tempest
- /var/log/tempest
- { 'path': /var/log/containers/tempest, 'setype': svirt_sandbox_file_t }
- { 'path': /var/log/tempest, 'setype': svirt_sandbox_file_t }
- { 'path': /var/lib/tempestdata, 'setype': svirt_sandbox_file_t }
- { 'path': /var/lib/tempest, 'setype': svirt_sandbox_file_t }
- name: Tempest logs readme
copy:
dest: /var/log/tempest/readme.txt