add sites-enabled and sites-available
This commit is contained in:
parent
1e273cf654
commit
425559a095
@ -5,7 +5,7 @@
|
||||
enabled: yes
|
||||
state: started
|
||||
|
||||
- name: Prepare directories
|
||||
- name: Prepare vhost directories
|
||||
file:
|
||||
path: '{{ item }}'
|
||||
state: directory
|
||||
@ -16,6 +16,17 @@
|
||||
- /var/www/vhosts
|
||||
- /var/www/vhosts/default
|
||||
|
||||
- name: Prepare nginx directories
|
||||
file:
|
||||
path: '{{ item }}'
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0640
|
||||
with_items:
|
||||
- /etc/nginx/sites-available
|
||||
- /etc/nginx/sites-enabled
|
||||
|
||||
- name: Add default page
|
||||
template:
|
||||
src: 'var/www/vhosts/default/index.html.j2'
|
||||
@ -42,11 +53,28 @@
|
||||
group: root
|
||||
mode: 0640
|
||||
with_items:
|
||||
- default.conf
|
||||
- header.conf
|
||||
notify:
|
||||
- nginx_restart
|
||||
|
||||
- name: Add default page config
|
||||
template:
|
||||
src: 'etc/nginx/conf.d/sites-available/default.j2'
|
||||
dest: '/etc/nginx/conf.d/sites-available/default'
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0640
|
||||
|
||||
- name: Enable default page
|
||||
file:
|
||||
src: /etc/nginx/sites-available/default
|
||||
dest: /etc/nginx/sites-enabled/default
|
||||
owner: root
|
||||
group: root
|
||||
state: link
|
||||
notify:
|
||||
- nginx_restart
|
||||
|
||||
- name: Open ports in iptables
|
||||
iptables_raw:
|
||||
name: allow_nginx_ports
|
||||
|
Loading…
Reference in New Issue
Block a user