mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Add example playbook of file module's selinux capabilities
This commit is contained in:
parent
be58995278
commit
0f044e64f8
1 changed files with 12 additions and 0 deletions
12
examples/playbooks/file_secontext.yml
Normal file
12
examples/playbooks/file_secontext.yml
Normal file
|
@ -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
|
||||
|
Loading…
Reference in a new issue