Prechádzať zdrojové kódy

Be more efficient while reloading web servers (config check)

Emmanuel Bouthenot 8 rokov pred
rodič
commit
fd855bc3da

+ 1 - 1
roles/webserver/handlers/apache2.yml

@@ -1,5 +1,5 @@
 - name: Reload apache2
-  service: name=apache2 state=reloaded
+  shell: apache2ctl configtest && apache2ctl graceful
 
 - name: Restart apache2
   service: name=apache2 state=restarted

+ 1 - 1
roles/webserver/handlers/nginx.yml

@@ -1,5 +1,5 @@
 - name: Reload nginx
-  service: name=nginx state=reloaded
+  shell: nginx -t && nginx -s reload
 
 - name: Restart nginx
   service: name=nginx state=restarted