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 - 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