Эх сурвалжийг харах

Merge pull request #42 from aleksandr-vin/fix/github-41-issue-wrong-SELinux-context

Remove new config validation, Fix #41
Jeff Geerling 9 жил өмнө
parent
commit
2cce06230f

+ 3 - 0
handlers/main.yml

@@ -5,3 +5,6 @@
 - name: validate nginx configuration
   command: nginx -t -c /etc/nginx/nginx.conf
   changed_when: False
+
+- name: reload nginx
+  service: name=nginx state=reloaded

+ 1 - 3
tasks/main.yml

@@ -26,10 +26,8 @@
     owner: root
     group: root
     mode: 0644
-    validate: 'nginx -t -c %s'
   notify:
-    - validate nginx configuration
-    - restart nginx
+    - reload nginx
 
 - name: Ensure nginx is started and enabled to start at boot.
   service: name=nginx state=started enabled=yes

+ 3 - 6
tasks/vhosts.yml

@@ -5,8 +5,7 @@
     state: absent
   when: nginx_remove_default_vhost
   notify:
-    - validate nginx configuration
-    - restart nginx
+    - reload nginx
 
 - name: Add managed vhost config file (if any vhosts are configured).
   template:
@@ -15,8 +14,7 @@
     mode: 0644
   when: nginx_vhosts|length > 0
   notify:
-    - validate nginx configuration
-    - restart nginx
+    - reload nginx
 
 - name: Remove managed vhost config file (if no vhosts are configured).
   file:
@@ -24,6 +22,5 @@
     state: absent
   when: nginx_vhosts|length == 0
   notify:
-    - validate nginx configuration
-    - restart nginx
+    - reload nginx