fix nginx role
This commit is contained in:
parent
f330deb690
commit
83e63c83a6
@ -1,10 +1,4 @@
|
|||||||
---
|
---
|
||||||
- name: Enable nginx service
|
|
||||||
service:
|
|
||||||
name: nginx
|
|
||||||
enabled: yes
|
|
||||||
state: started
|
|
||||||
|
|
||||||
- name: Prepare vhost directories
|
- name: Prepare vhost directories
|
||||||
file:
|
file:
|
||||||
path: '{{ item }}'
|
path: '{{ item }}'
|
||||||
@ -113,7 +107,7 @@
|
|||||||
notify:
|
notify:
|
||||||
- nginx_reload
|
- nginx_reload
|
||||||
|
|
||||||
- name: register dhparam file
|
- name: Register dhparam file
|
||||||
stat:
|
stat:
|
||||||
path: "{{ dhparam_file }}"
|
path: "{{ dhparam_file }}"
|
||||||
register: dh_file
|
register: dh_file
|
||||||
@ -122,7 +116,7 @@
|
|||||||
shell: "/usr/bin/openssl dhparam -out '{{ dhparam_file }}' {{ dhparam_size }}"
|
shell: "/usr/bin/openssl dhparam -out '{{ dhparam_file }}' {{ dhparam_size }}"
|
||||||
async: 3600
|
async: 3600
|
||||||
poll: 60
|
poll: 60
|
||||||
when: dh_file.stat.exists == 'false'
|
when: dh_file.stat.exists == False
|
||||||
notify:
|
notify:
|
||||||
- nginx_reload
|
- nginx_reload
|
||||||
|
|
||||||
@ -131,3 +125,9 @@
|
|||||||
name: allow_nginx_ports
|
name: allow_nginx_ports
|
||||||
state: present
|
state: present
|
||||||
rules: '-A INPUT -p tcp -m multiport --dports {{ nginx_open_ports|join(",") }} -j ACCEPT'
|
rules: '-A INPUT -p tcp -m multiport --dports {{ nginx_open_ports|join(",") }} -j ACCEPT'
|
||||||
|
|
||||||
|
- name: Enable nginx service
|
||||||
|
service:
|
||||||
|
name: nginx
|
||||||
|
enabled: yes
|
||||||
|
state: started
|
||||||
|
Loading…
Reference in New Issue
Block a user