]> arthur.barton.de Git - AnsibleRoles.git/blobdiff - roles/apache2-php5/tasks/main.yml
Apt module: Update "state=installed" to "state=present"
[AnsibleRoles.git] / roles / apache2-php5 / tasks / main.yml
index 9ba6a7f533eb23b82da36d1d787a7249b93d5e5e..7bcd63f8f2c39aa318d831592ff12f256a13a554 100644 (file)
@@ -5,7 +5,7 @@
   tags:
     - apache
     - packages
-  command: dpkg --print-avail php5-apcu
+  shell: apt-cache search php5-apcu | grep "^php5-apcu -" >/dev/null
   check_mode: no
   register: php5_apcu_is_available
   failed_when: php5_apcu_is_available.rc > 1
     - apache
     - packages
   apt: >
-    state=installed
+    state=present
     name={{ item }}
   with_items:
     - libapache2-mod-php5
-    - php5-apcu
     - php5
     - php5-cli
     - php5-mysql
@@ -32,7 +31,7 @@
     - apache
     - packages
   apt: >
-    state=installed
+    state=present
     name=php5-apcu
   notify:
     - restart "apache2"
     - apache
     - packages
   apt: >
-    state=installed
+    state=present
     name=php-apc
   notify:
     - restart "apache2"
   when: php5_apcu_is_available.rc != 0
 
-- name: ensure service "apache2" is enabled and running
+- name: ensure service "apache2" is enabled and started
   tags:
     - apache
     - services
   service: >
     enabled=yes
     name=apache2
-    state=running
+    state=started