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
|
name: nginx
|
||||||
state: installed
|
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
|
- name: create nginx data and config directories
|
||||||
file:
|
file:
|
||||||
state: directory
|
state: directory
|
||||||
|
@ -14,17 +19,13 @@
|
||||||
mode: 0755
|
mode: 0755
|
||||||
owner: root
|
owner: root
|
||||||
group: "{{ ansible_wheel }}"
|
group: "{{ ansible_wheel }}"
|
||||||
|
seuser: _default
|
||||||
|
setype: _default
|
||||||
with_items:
|
with_items:
|
||||||
- /srv/web
|
- /srv/web
|
||||||
- "/srv/web/{{ inventory_hostname }}"
|
- "/srv/web/{{ inventory_hostname }}"
|
||||||
- "/etc/nginx/conf.d/{{ 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
|
- name: create nginx base config
|
||||||
template:
|
template:
|
||||||
src: nginx.conf.j2
|
src: nginx.conf.j2
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue