From 83e63c83a64bb2250ca3eb32b7d56111d4c12b86 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 29 Aug 2017 22:48:50 +0200 Subject: [PATCH] fix nginx role --- tasks/config.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tasks/config.yml b/tasks/config.yml index 6068cb7..ebbd396 100644 --- a/tasks/config.yml +++ b/tasks/config.yml @@ -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