fix nginx role

This commit is contained in:
Robert Kaussow 2017-08-29 22:48:50 +02:00
parent f330deb690
commit 83e63c83a6

View File

@ -1,10 +1,4 @@
---
- name: Enable nginx service
service:
name: nginx
enabled: yes
state: started
- name: Prepare vhost directories
file:
path: '{{ item }}'
@ -113,7 +107,7 @@
notify:
- nginx_reload
- name: register dhparam file
- name: Register dhparam file
stat:
path: "{{ dhparam_file }}"
register: dh_file
@ -122,7 +116,7 @@
shell: "/usr/bin/openssl dhparam -out '{{ dhparam_file }}' {{ dhparam_size }}"
async: 3600
poll: 60
when: dh_file.stat.exists == 'false'
when: dh_file.stat.exists == False
notify:
- nginx_reload
@ -131,3 +125,9 @@
name: allow_nginx_ports
state: present
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