1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Template: Example of SELinux context type (#54861)

* Update template.py with an example using selinux with a suggestion of how to get the proper file context (cheating!)
This commit is contained in:
Mauricio Tavares 2019-04-15 13:06:48 -04:00 committed by Alicia Cozine
parent e90df4b566
commit f8834c5339

View file

@ -162,6 +162,14 @@ EXAMPLES = r'''
group: wheel group: wheel
mode: u=rw,g=r,o=r mode: u=rw,g=r,o=r
- name: Copy a version of named.conf that is dependent on the OS. setype obtained by doing ls -Z /etc/named.conf on original file
template:
src: named.conf_{{ ansible_os_family}}.j2
dest: /etc/named.conf
group: named
setype: named_conf_t
mode: 0640
- name: Create a DOS-style text file from a template - name: Create a DOS-style text file from a template
template: template:
src: config.ini.j2 src: config.ini.j2