From 7e5a69e1fdc44059eef19d89b069894357c233ec Mon Sep 17 00:00:00 2001 From: Martin Krizek Date: Wed, 11 Jan 2017 15:01:14 +0000 Subject: [PATCH] taskotron-stg: set selinux context after the dir actually exists --- roles/taskotron/buildmaster/tasks/main.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/roles/taskotron/buildmaster/tasks/main.yml b/roles/taskotron/buildmaster/tasks/main.yml index c89015cd2d..263ca8dea3 100644 --- a/roles/taskotron/buildmaster/tasks/main.yml +++ b/roles/taskotron/buildmaster/tasks/main.yml @@ -34,14 +34,6 @@ 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 in ['dev', 'stg', 'qa-stg'] - -- name: make sure the selinux fcontext is restored - command: restorecon -R "{{ buildmaster_home }}" - when: deployment_type in ['dev', 'stg', 'qa-stg'] - - name: add the buildmaster user user: name={{ buildmaster_user }} home={{ buildmaster_home }} @@ -53,6 +45,14 @@ file: path="{{ buildmaster_home }}" state=directory owner=buildmaster group=buildmaster mode=0775 when: deployment_type in ['dev', '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 ['dev', 'stg', 'qa-stg'] + +- name: make sure the selinux fcontext is restored + command: restorecon -R "{{ buildmaster_home }}" + when: deployment_type in ['dev', 'stg', 'qa-stg'] + - name: allow httpd tcp connections with selinux seboolean: name=httpd_can_network_connect state=true persistent=yes