Initial commit
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
---
|
||||
- name: Install nginx
|
||||
yum:
|
||||
name: nginx
|
||||
|
||||
- name: enable nginx
|
||||
ignore_errors: yes
|
||||
systemd:
|
||||
name: nginx
|
||||
enabled: yes
|
||||
state: started
|
||||
|
||||
- name: create static dir
|
||||
file:
|
||||
path: /home/appuser/wo-bisch-web/static
|
||||
state: directory
|
||||
|
||||
- name: 502 error page
|
||||
copy:
|
||||
src: 502.html
|
||||
dest: /home/appuser/wo-bisch-web/static/502.html
|
||||
|
||||
- name: copy css files
|
||||
copy:
|
||||
src: "{{ item }}"
|
||||
dest: "/home/appuser/wo-bisch-web/static/{{ item }}"
|
||||
loop:
|
||||
- wo-bisch-web.css
|
||||
- wo-bisch-web-custom.css
|
||||
|
||||
- name: Allow apache to read files in /root/.acme.sh/wo-bisch.ch
|
||||
sefcontext:
|
||||
target: '/root/.acme.sh/mail2.nbit.ch(/.*)?'
|
||||
setype: httpd_sys_content_t
|
||||
state: present
|
||||
notify:
|
||||
- Restore selinux context
|
||||
|
||||
- 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
|
||||
Reference in New Issue
Block a user