From db9ff499333a2012e303700c27c79b96aacfc261 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Wed, 29 Apr 2015 17:43:43 +0000 Subject: Fix selinux on stg koji. Thanks Max! --- roles/koji_hub/tasks/main.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/roles/koji_hub/tasks/main.yml b/roles/koji_hub/tasks/main.yml index 3839564c4..0b5642f6f 100644 --- a/roles/koji_hub/tasks/main.yml +++ b/roles/koji_hub/tasks/main.yml @@ -206,6 +206,24 @@ tags: - koji_hub +- name: check selinux default context for /mnt/fedora_koji in staging + command: matchpathcon /mnt/fedora_koji + register: mnt_fedora_koji_context + when: env == "staging" + always_run: yes + changed_when: "1 != 1" + tags: + - koji_hub + - selinux + +- name: /mnt/fedora_koji selinux file context + command: semanage fcontext -a -t httpd_sys_rw_content_t "/mnt/fedora_koji(/.*)?" + when: env == "staging" and + mnt_fedora_koji_context.stdout.find('httpd_sys_rw_content_t') == -1 + tags: + - koji_hub + - selinux + - name: set sebooleans so koji can talk to the db seboolean: name=httpd_can_network_connect_db state=true persistent=true tags: -- cgit