From 7f01af8a88225f18d2d784ce45dbcab7d84580c2 Mon Sep 17 00:00:00 2001 From: Tim Flink Date: Tue, 8 Nov 2016 21:46:08 +0000 Subject: [PATCH] updating selinux context for buildmaster files on taskotron-dev --- roles/taskotron/buildmaster/tasks/main.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/roles/taskotron/buildmaster/tasks/main.yml b/roles/taskotron/buildmaster/tasks/main.yml index aabedb51f9..7c4c241f8c 100644 --- a/roles/taskotron/buildmaster/tasks/main.yml +++ b/roles/taskotron/buildmaster/tasks/main.yml @@ -29,13 +29,20 @@ with_items: - python-novaclient +- 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 == 'dev' + - name: add the buildmaster user user: name={{ buildmaster_user }} home={{ buildmaster_home }} - -- name: ensure buildmaster user can use home directory +- name: ensure buildmaster user can use home directory (old) file: path="{{ buildmaster_home }}" state=directory owner=buildmaster group=buildmaster mode=0775 setype=user_home_t - when: deployment_type == 'prod' or deployment_type == 'stg' or deployment_type == 'dev' or deployment_type == 'local' + when: deployment_type == 'prod' or deployment_type == 'stg' or deployment_type == 'local' + +- name: ensure buildmaster user can use home directory (new) + file: path="{{ buildmaster_home }}" state=directory owner=buildmaster group=buildmaster mode=0775 + when: deployment_type in ['dev'] - name: allow httpd tcp connections with selinux seboolean: name=httpd_can_network_connect state=true persistent=yes