Template: Example of SELinux context type (#54861) (#55540)

* Update template.py with an example using selinux with a suggestion of how to get the proper file context (cheating!)

(cherry picked from commit f8834c5339)
This commit is contained in:
Alicia Cozine 2019-04-22 09:54:39 -05:00 committed by GitHub
parent 2781230d8e
commit 57d3a17965
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -162,6 +162,14 @@ EXAMPLES = r'''
group: wheel
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
template:
src: config.ini.j2