45 lines
985 B
YAML
45 lines
985 B
YAML
---
|
|
- name: Install nginx
|
|
yum:
|
|
name: nginx
|
|
|
|
- name: enable nginx
|
|
ignore_errors: yes
|
|
systemd:
|
|
name: nginx
|
|
enabled: yes
|
|
state: started
|
|
|
|
- name: Set httpd_can_network_connect flag on and keep it persistent across reboots
|
|
seboolean:
|
|
name: httpd_can_network_connect
|
|
state: yes
|
|
persistent: yes
|
|
|
|
- name: create /etc/nginx/nginx.conf from template
|
|
template:
|
|
src: nginx.conf.j2
|
|
dest: /etc/nginx/nginx.conf
|
|
owner: root
|
|
group: root
|
|
mode: '0644'
|
|
notify: Restart nginx
|
|
|
|
- name: Allow apache to read files in /etc/letsencrypt/{{ letsEncryptDomain }}
|
|
sefcontext:
|
|
target: '/etc/letsencrypt/{{ letsEncryptDomain }}(/.*)?'
|
|
setype: httpd_sys_content_t
|
|
state: present
|
|
notify:
|
|
- Restore selinux context
|
|
|
|
- name: create certificate directory
|
|
file:
|
|
path: /etc/letsencrypt/{{ letsEncryptDomain }}
|
|
state: directory
|
|
|
|
- name: create static dir
|
|
file:
|
|
path: /home/beieli/mini-beieli-web/static
|
|
state: directory
|