[deyu1@kvm19 ansible]$ ansible-doc sefcontext
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 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
[deyu1@kvm19 ansible]$ ansible-doc yum | grep ^EX -A5 EXAMPLES: - name: install the latest version of Apache yum: name: httpd state: latest