[deyu1@kvm19 ansible]$ ansible-doc sefcontext
[deyu1@kvm19 ansible]$ ansible-doc dnf | grep ^EX -A5
EXAMPLES:
- name: install the latest version of ....
ansible.builtin.dnf:
name: .......
state: latest
httpd_git_rw_content_t。
[deyu1@kvm19 ansible]$ ansible-doc sefcontext | grep ^EX -A7
EXAMPLES:
- name: Allow apache to modify files in /srv/git_repos
community.general.sefcontext:
target: '/srv/git_repos(/.*)?'
setype: httpd_git_rw_content_t
state: present
- name: Apply new SELinux file context to filesystem command: restorecon -irv /srv/git_repos