selinux file context fixes for nginx data directories
This commit is contained in:
parent
5016b70292
commit
8920d79078
1 changed files with 7 additions and 6 deletions
|
@ -7,6 +7,11 @@
|
|||
name: nginx
|
||||
state: installed
|
||||
|
||||
- name: fix selinux contexts from data directory
|
||||
sefcontext:
|
||||
path: /srv/web(/.*)?
|
||||
setype: httpd_sys_content_t
|
||||
when: ansible_selinux_python_present == true
|
||||
- name: create nginx data and config directories
|
||||
file:
|
||||
state: directory
|
||||
|
@ -14,17 +19,13 @@
|
|||
mode: 0755
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
seuser: _default
|
||||
setype: _default
|
||||
with_items:
|
||||
- /srv/web
|
||||
- "/srv/web/{{ inventory_hostname }}"
|
||||
- "/etc/nginx/conf.d/{{ inventory_hostname }}"
|
||||
|
||||
- name: fix selinux contexts from data directory
|
||||
sefcontext:
|
||||
path: /srv/web(/.*)?
|
||||
setype: httpd_sys_content_t
|
||||
when: ansible_selinux_python_present == true
|
||||
|
||||
- name: create nginx base config
|
||||
template:
|
||||
src: nginx.conf.j2
|
||||
|
|
Loading…
Add table
Reference in a new issue