This pull request includes some additional enhancements:
The selinux type can now also be set.
Triggers automatic relabeling when switching from disabled to other states.
New recipe to install setroubleshootd.
Update 3/15/2013: I have done more work on this since first opening this push request. There are new LWRPs for SELinux boolean and for SELinux file contexts. In addition, a monkey patch will now automatically call restorecon to fix up the SELinux context for new files and directories. All of it should be idempotent.
I'm going to close this due to inactivity as we've been awaiting a response. Please feel free to reopen this Pull Request if you have more time to work on this issue :smile:!
This pull request is based on j. timmerman's earlier work on COOK-760; that work is now completed. It is also based on an original monkey patch proposed by Sean OMeara here: https://github.com/someara/cookbooks/blob/selinux-monkeys/selinux/libraries/monkeys.rb
This pull request includes some additional enhancements:
Update 3/15/2013: I have done more work on this since first opening this push request. There are new LWRPs for SELinux boolean and for SELinux file contexts. In addition, a monkey patch will now automatically call restorecon to fix up the SELinux context for new files and directories. All of it should be idempotent.