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
- apache
- packages
apt: >
- state=installed
+ state=present
name=php5-apcu
notify:
- restart "apache2"
- apache
- packages
apt: >
- state=installed
- name=apc-php
+ 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