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>
This commit is contained in:
Gael Chamoulaud 2019-11-27 10:28:39 +01:00
parent 566bcf66ce
commit ead21a609f
No known key found for this signature in database
GPG Key ID: 00776A4BA7F4B301
1 changed files with 15 additions and 7 deletions

View File

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