]> arthur.barton.de Git - AnsibleRoles.git/blobdiff - roles/apache2-php5/tasks/main.yml
apache2-php5, check-mk-agent: Fix warnings of ansible-lint(1)
[AnsibleRoles.git] / roles / apache2-php5 / tasks / main.yml
index bb13210fdb6e19568142b46344ed644e1d1a4589..5946f003670e39a61d1a0c5a1df1981644cd5739 100644 (file)
@@ -5,7 +5,11 @@
   tags:
     - apache
     - packages
-  shell: apt-cache search php5-apcu | grep "^php5-apcu -" >/dev/null
+  shell: |
+    set -o pipefail
+    apt-cache search php5-apcu | grep "^php5-apcu -" >/dev/null
+  args:
+    executable: /bin/bash
   check_mode: no
   register: php5_apcu_is_available
   failed_when: php5_apcu_is_available.rc > 1
   tags:
     - apache
     - packages
-  apt: >
-    state=installed
-    name={{ item }}
-  with_items:
-    - libapache2-mod-php5
-    - php5
-    - php5-cli
-    - php5-mysql
+  apt:
+    state: present
+    name: [
+      'libapache2-mod-php5',
+      'php5',
+      'php5-cli',
+      'php5-mysql',
+    ]
   notify:
     - restart "apache2"
 
@@ -31,7 +35,7 @@
     - apache
     - packages
   apt: >
-    state=installed
+    state=present
     name=php5-apcu
   notify:
     - restart "apache2"
@@ -42,7 +46,7 @@
     - apache
     - packages
   apt: >
-    state=installed
+    state=present
     name=php-apc
   notify:
     - restart "apache2"