From 047caaf50c24f80ad66d474ae7386885ab07367f Mon Sep 17 00:00:00 2001 From: Josef Skladanka Date: Tue, 21 Nov 2017 23:36:23 +0100 Subject: [PATCH] taskotron - fix selinux context the same way we do in buildslave-configure --- roles/taskotron/buildmaster/tasks/main.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/roles/taskotron/buildmaster/tasks/main.yml b/roles/taskotron/buildmaster/tasks/main.yml index 1947e6b8a4..abde160f08 100644 --- a/roles/taskotron/buildmaster/tasks/main.yml +++ b/roles/taskotron/buildmaster/tasks/main.yml @@ -45,9 +45,13 @@ file: path="{{ buildmaster_home }}" state=directory owner=buildmaster group=buildmaster mode=0775 when: deployment_type in ['dev', 'stg', 'prod'] -#- name: set the selinux fcontext type for the buildmaster_home to var_lib_t -# command: semanage fcontext -a -t var_lib_t "{{ buildmaster_home }}(/.*)?" -# when: deployment_type in ['dev', 'stg', 'prod', 'qa-stg'] +- name: set the selinux fcontext type for the buildmaster_home to var_lib_t + command: semanage fcontext -a -t var_lib_t "{{ buildmaster_home }}(/.*)?" + when: deployment_type in ['stg', 'prod', 'qa-stg'] + +- name: ensure correct fcontext for buildmaster home (new) + file: path="{{ buildmaster_home }}(/. *)?" setype=var_lib_t owner=buildmaster group=buildmaster mode=0775 state=directory + when: deployment_type == 'dev' #- name: make sure the selinux fcontext is restored # command: restorecon -R "{{ buildmaster_home }}"