Sfoglia il codice sorgente

Fix variables scope issues

Emmanuel Bouthenot 11 anni fa
parent
commit
7a0fe1f998
2 ha cambiato i file con 5 aggiunte e 5 eliminazioni
  1. 4 4
      roles/monitoring/tasks/munin.yml
  2. 1 1
      roles/webserver/tasks/php.yml

+ 4 - 4
roles/monitoring/tasks/munin.yml

@@ -47,25 +47,25 @@
   template: src=munin/nginx_vhost.j2 dest=/etc/nginx/sites-available/munin owner=root group=root mode=0644
   notify:
     - Reload nginx for munin
-  when: with_munin and with_nginx
+  when: with_munin and with_nginx is defined and with_nginx
 
 - name: Install nginx virtual host for munin (sites-enabled)
   file: src=/etc/nginx/sites-available/munin path=/etc/nginx/sites-enabled/munin state=link
   notify:
     - Reload nginx for munin
-  when: with_munin and with_nginx
+  when: with_munin and with_nginx is defined and with_nginx
 
 - name: Install apache2 virtual host for munin (sites-available)
   template: src=munin/apache2_vhost.j2 dest=/etc/apache2/sites-available/munin owner=root group=root mode=0644
   notify:
     - Reload apache2 for munin
-  when: with_munin and with_apache2
+  when: with_munin and with_apache2 is defined and with_apache2
 
 - name: Install apache2 virtual host for munin (sites-enabled)
   file: src=/etc/apache2/sites-available/munin path=/etc/apache2/sites-enabled/munin state=link
   notify:
     - Reload apache2 for munin
-  when: with_munin and with_apache2
+  when: with_munin and with_apache2 is defined and with_apache2
 
 - name: Ensure munin-node is running
   service: name=munin-node state=started

+ 1 - 1
roles/webserver/tasks/php.yml

@@ -31,7 +31,7 @@
 
 - name: Install MySQL extension for PHP
   apt: pkg=php5-mysqlnd state=installed update_cache=yes
-  when: with_mysql and with_php
+  when: with_php and with_mysql is defined and with_mysql
 
 - name: Install PHPMyAdmin
   apt: pkg=phpmyadmin state=installed update_cache=yes