From 6f12957c6750de6ce1a85bd7142ac8197f9fa40d Mon Sep 17 00:00:00 2001 From: Till Maas Date: Fri, 31 Jul 2015 20:18:50 +0200 Subject: [PATCH] Move planet selinux task from people to planet role --- roles/people/tasks/main.yml | 15 --------------- roles/planet/tasks/main.yml | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/roles/people/tasks/main.yml b/roles/people/tasks/main.yml index 5629e82e2c..bf10b2fe61 100644 --- a/roles/people/tasks/main.yml +++ b/roles/people/tasks/main.yml @@ -79,21 +79,6 @@ - config - selinux -- name: check the selinux context of the planet dir - command: matchpathcon "/srv/planet(/.*)?" - register: gitcontext - always_run: yes - changed_when: false - tags: - - config - - selinux - -- name: set the SELinux policy for the planet dir - command: semanage fcontext -a -t httpd_sys_content_t "/srv/planet(/.*)?" - when: gitcontext.stdout.find('httpd_sys_content_t') == -1 - tags: - - config - - selinux - name: check the selinux context of the web dir command: matchpathcon "/srv/web(/.*)?" diff --git a/roles/planet/tasks/main.yml b/roles/planet/tasks/main.yml index 02ebfc913c..318c725929 100644 --- a/roles/planet/tasks/main.yml +++ b/roles/planet/tasks/main.yml @@ -51,6 +51,24 @@ - /srv/planet/site - /srv/planet/config +- name: check the selinux context of the planet dir + command: matchpathcon "/srv/planet(/.*)?" + register: gitcontext + always_run: yes + changed_when: false + tags: + - config + - selinux + - planet_server + +- name: set the SELinux policy for the planet dir + command: semanage fcontext -a -t httpd_sys_content_t "/srv/planet(/.*)?" + when: gitcontext.stdout.find('httpd_sys_content_t') == -1 + tags: + - config + - selinux + - planet_server + - name: copy the run-planet script copy: src=run-planet dest=/srv/planet/config/run-planet tags: