Create Validations logging directory

The Validation framework is logging every execution in the
/var/log/validations directory and this one should be created first.

This patch also get rid of the validations user creation because we
don't need anymore since Mistral is out for the validator CLI.

Change-Id: I502c38d3f27db3c6f62a47190136dd03627956bc
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
(cherry picked from commit ead21a609f)
This commit is contained in:
Gael Chamoulaud 2019-11-27 10:28:39 +01:00
parent 62bce8edbf
commit e26dca0c95
1 changed files with 15 additions and 7 deletions

View File

@ -19,11 +19,19 @@
name: 'openstack-tripleo-validations'
state: installed
- name: 'Create validations user'
user:
name: 'validations'
comment: 'Tripleo validations'
create_home: true
home: '/home/validations'
shell: '/sbin/nologin'
- name: Set group name fact
set_fact:
validations_group_name: "{{ lookup('env', 'SUDO_USER') | default(ansible_user_id, true) }}"
- name: Ensure 'validations_group_name' exists
group:
name: "{{ validations_group_name }}"
state: present
- name: 'Create validations logging directory'
file:
path: '/var/log/validations'
state: directory
owner: 'root'
group: "{{ validations_group_name }}"
mode: '2770'