# Assistance with sefcontext module

**URL:** <https://forum.ansible.com/t/assistance-with-sefcontext-module/25434>\
**Category:** Ansible Project\
**Created:** [September 7, 2017, 10:09pm UTC](https://forum.ansible.com/t/assistance-with-sefcontext-module/25434 "2017-09-07T22:09:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![William\_Muriithi](https://avatars.discourse-cdn.com/v4/letter/w/6de8d8/32.png) [@William\_Muriithi](https://forum.ansible.com/u/William_Muriithi)\
**Post date:** [September 7, 2017, 10:09pm UTC](https://forum.ansible.com/t/assistance-with-sefcontext-module/25434/1 "2017-09-07T22:09:44Z")

</div>

Afternoon,

I am attempting to convert a task that currently use shell to use  
sefcontext module and its not working as documented. Have anyone  
previously used this module successfully? Below is my intention and  
observation.

The current working solution  
chcon -R -t httpd\_sys\_rw\_content\_t {{svn\_root}}/projects

The task that are currently not working  
&nbsp;&nbsp;&nbsp;&nbsp;- name: Set http security context  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sefcontext: setype=httpd\_sys\_content\_t  
target='{{svn\_root}}/projects(/.\*)?' state=present  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tags:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- selinux\_svn

&nbsp;&nbsp;&nbsp;&nbsp;- name: set context that enables commits over http  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sefcontext: setype=httpd\_sys\_rw\_content\_t  
target='{{svn\_root}}/projects(/.\*)?' state=present  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tags:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- selinux\_svn

The result of running above task in verbose mode

TASK [svn : Set http security context]
