]> arthur.barton.de Git - AnsibleRoles.git/blobdiff - roles/apache2-php5/tasks/main.yml
Always run "check tasks" to register variables, even in "check mode"
[AnsibleRoles.git] / roles / apache2-php5 / tasks / main.yml
index 7905049dc20a964485343bfe8fdb7d539069df5e..2f028196796e5006f935618545c7eab508b7b358 100644 (file)
@@ -6,6 +6,7 @@
     - apache
     - packages
   command: dpkg --print-avail php5-apcu
+  check_mode: no
   register: php5_apcu_is_available
   failed_when: php5_apcu_is_available.rc > 1
   changed_when: no
@@ -35,7 +36,7 @@
     name=php5-apcu
   notify:
     - restart "apache2"
-  when: php5_apcu_is_available is defined and php5_apcu_is_available.rc == 0
+  when: php5_apcu_is_available.rc == 0
 
 - name: install "php-apc" cache
   tags:
@@ -46,7 +47,7 @@
     name=apc-php
   notify:
     - restart "apache2"
-  when: php5_apcu_is_available is defined and php5_apcu_is_available.rc != 0
+  when: php5_apcu_is_available.rc != 0
 
 - name: ensure service "apache2" is enabled and running
   tags: