]> arthur.barton.de Git - AnsibleRoles.git/blob - roles/apache2-php5/tasks/main.yml
apache2-php5: Fix name of "php-apc" package
[AnsibleRoles.git] / roles / apache2-php5 / tasks / main.yml
1 ---
2 # apache2-php5 tasks
3
4 - name: check if "php5-apcu" package exists
5   tags:
6     - apache
7     - packages
8   command: dpkg --print-avail php5-apcu
9   check_mode: no
10   register: php5_apcu_is_available
11   failed_when: php5_apcu_is_available.rc > 1
12   changed_when: no
13
14 - name: install packages for Apache 2 with PHP 5
15   tags:
16     - apache
17     - packages
18   apt: >
19     state=installed
20     name={{ item }}
21   with_items:
22     - libapache2-mod-php5
23     - php5-apcu
24     - php5
25     - php5-cli
26     - php5-mysql
27   notify:
28     - restart "apache2"
29
30 - name: install "php5-apcu" cache
31   tags:
32     - apache
33     - packages
34   apt: >
35     state=installed
36     name=php5-apcu
37   notify:
38     - restart "apache2"
39   when: php5_apcu_is_available.rc == 0
40
41 - name: install "php-apc" cache
42   tags:
43     - apache
44     - packages
45   apt: >
46     state=installed
47     name=php-apc
48   notify:
49     - restart "apache2"
50   when: php5_apcu_is_available.rc != 0
51
52 - name: ensure service "apache2" is enabled and running
53   tags:
54     - apache
55     - services
56   service: >
57     enabled=yes
58     name=apache2
59     state=running