From 0f044e64f85dbfe18410b881eb8c30de9de08a39 Mon Sep 17 00:00:00 2001 From: Stephen Fromm Date: Sat, 21 Apr 2012 23:30:08 -0700 Subject: [PATCH] Add example playbook of file module's selinux capabilities --- examples/playbooks/file_secontext.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 examples/playbooks/file_secontext.yml diff --git a/examples/playbooks/file_secontext.yml b/examples/playbooks/file_secontext.yml new file mode 100644 index 00000000000..75ab6ad49ad --- /dev/null +++ b/examples/playbooks/file_secontext.yml @@ -0,0 +1,12 @@ +--- +# This is a demo of how to manage the selinux context using the file module +- hosts: test + user: root + tasks: + - name: Change setype of /etc/exports to non-default value + action: file path=/etc/exports setype=etc_t + - name: Change seuser of /etc/exports to non-default value + action: file path=/etc/exports seuser=unconfined_u + - name: Set selinux context back to default value + action: file path=/etc/exports context=default +