Skip to content

Commit db24bae

Browse files
committed
Fix php modules for alpine (workaround) part 2
Add missing part for php, php-apache and php-nginx images
1 parent 64aa17f commit db24bae

File tree

27 files changed

+594
-7
lines changed

27 files changed

+594
-7
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
3+
#############################
4+
# Workaround PHP configuration files
5+
# for alpine
6+
#############################
7+
8+
- name: Get list of PHP5 configuration files
9+
command: "ls /etc/php5/conf.d/ |grep .ini"
10+
register: php5_ini
11+
when: ansible_distribution == 'Alpine'
12+
ignore_errors: yes
13+
14+
- name: Link configuration files from php5 to php
15+
file:
16+
src: '/etc/php5/conf.d/{{ item }}'
17+
dest: '/etc/php/conf.d/{{ item }}'
18+
state: link
19+
with_items: "{{ php5_ini.stdout_lines }}"
20+
when: ansible_distribution == 'Alpine' and php5_ini is defined
21+
ignore_errors: yes
22+
23+
#############################
24+
# Workaround PHP module files
25+
# for alpine
26+
#############################
27+
28+
- name: Get list of PHP5 modules
29+
command: "ls /usr/lib/php5/modules/ |grep .so"
30+
register: php5_modules
31+
when: ansible_distribution == 'Alpine'
32+
ignore_errors: yes
33+
34+
- name: Link module files from php5 to php
35+
file:
36+
src: '/usr/lib/php5/modules/{{ item }}'
37+
dest: '/usr/lib/php/modules/{{ item }}'
38+
state: link
39+
with_items: "{{ php5_modules.stdout_lines }}"
40+
when: ansible_distribution == 'Alpine' and php5_modules is defined
41+
ignore_errors: yes
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22

33
- include: bootstrap/php.yml
4+
- include: bootstrap/php-module.yml
45
- include: bootstrap/php-fpm.main.yml
56
- include: bootstrap/php-fpm.pool.yml
67
- include: bootstrap/php-fpm.yml
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
3+
#############################
4+
# Workaround PHP configuration files
5+
# for alpine
6+
#############################
7+
8+
- name: Get list of PHP5 configuration files
9+
command: "ls /etc/php5/conf.d/ |grep .ini"
10+
register: php5_ini
11+
when: ansible_distribution == 'Alpine'
12+
ignore_errors: yes
13+
14+
- name: Link configuration files from php5 to php
15+
file:
16+
src: '/etc/php5/conf.d/{{ item }}'
17+
dest: '/etc/php/conf.d/{{ item }}'
18+
state: link
19+
with_items: "{{ php5_ini.stdout_lines }}"
20+
when: ansible_distribution == 'Alpine' and php5_ini is defined
21+
ignore_errors: yes
22+
23+
#############################
24+
# Workaround PHP module files
25+
# for alpine
26+
#############################
27+
28+
- name: Get list of PHP5 modules
29+
command: "ls /usr/lib/php5/modules/ |grep .so"
30+
register: php5_modules
31+
when: ansible_distribution == 'Alpine'
32+
ignore_errors: yes
33+
34+
- name: Link module files from php5 to php
35+
file:
36+
src: '/usr/lib/php5/modules/{{ item }}'
37+
dest: '/usr/lib/php/modules/{{ item }}'
38+
state: link
39+
with_items: "{{ php5_modules.stdout_lines }}"
40+
when: ansible_distribution == 'Alpine' and php5_modules is defined
41+
ignore_errors: yes
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22

33
- include: bootstrap/php.yml
4+
- include: bootstrap/php-module.yml
45
- include: bootstrap/php-fpm.main.yml
56
- include: bootstrap/php-fpm.pool.yml
67
- include: bootstrap/php-fpm.yml
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
3+
#############################
4+
# Workaround PHP configuration files
5+
# for alpine
6+
#############################
7+
8+
- name: Get list of PHP5 configuration files
9+
command: "ls /etc/php5/conf.d/ |grep .ini"
10+
register: php5_ini
11+
when: ansible_distribution == 'Alpine'
12+
ignore_errors: yes
13+
14+
- name: Link configuration files from php5 to php
15+
file:
16+
src: '/etc/php5/conf.d/{{ item }}'
17+
dest: '/etc/php/conf.d/{{ item }}'
18+
state: link
19+
with_items: "{{ php5_ini.stdout_lines }}"
20+
when: ansible_distribution == 'Alpine' and php5_ini is defined
21+
ignore_errors: yes
22+
23+
#############################
24+
# Workaround PHP module files
25+
# for alpine
26+
#############################
27+
28+
- name: Get list of PHP5 modules
29+
command: "ls /usr/lib/php5/modules/ |grep .so"
30+
register: php5_modules
31+
when: ansible_distribution == 'Alpine'
32+
ignore_errors: yes
33+
34+
- name: Link module files from php5 to php
35+
file:
36+
src: '/usr/lib/php5/modules/{{ item }}'
37+
dest: '/usr/lib/php/modules/{{ item }}'
38+
state: link
39+
with_items: "{{ php5_modules.stdout_lines }}"
40+
when: ansible_distribution == 'Alpine' and php5_modules is defined
41+
ignore_errors: yes
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22

33
- include: bootstrap/php.yml
4+
- include: bootstrap/php-module.yml
45
- include: bootstrap/php-fpm.main.yml
56
- include: bootstrap/php-fpm.pool.yml
67
- include: bootstrap/php-fpm.yml
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
3+
#############################
4+
# Workaround PHP configuration files
5+
# for alpine
6+
#############################
7+
8+
- name: Get list of PHP5 configuration files
9+
command: "ls /etc/php5/conf.d/ |grep .ini"
10+
register: php5_ini
11+
when: ansible_distribution == 'Alpine'
12+
ignore_errors: yes
13+
14+
- name: Link configuration files from php5 to php
15+
file:
16+
src: '/etc/php5/conf.d/{{ item }}'
17+
dest: '/etc/php/conf.d/{{ item }}'
18+
state: link
19+
with_items: "{{ php5_ini.stdout_lines }}"
20+
when: ansible_distribution == 'Alpine' and php5_ini is defined
21+
ignore_errors: yes
22+
23+
#############################
24+
# Workaround PHP module files
25+
# for alpine
26+
#############################
27+
28+
- name: Get list of PHP5 modules
29+
command: "ls /usr/lib/php5/modules/ |grep .so"
30+
register: php5_modules
31+
when: ansible_distribution == 'Alpine'
32+
ignore_errors: yes
33+
34+
- name: Link module files from php5 to php
35+
file:
36+
src: '/usr/lib/php5/modules/{{ item }}'
37+
dest: '/usr/lib/php/modules/{{ item }}'
38+
state: link
39+
with_items: "{{ php5_modules.stdout_lines }}"
40+
when: ansible_distribution == 'Alpine' and php5_modules is defined
41+
ignore_errors: yes
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22

33
- include: bootstrap/php.yml
4+
- include: bootstrap/php-module.yml
45
- include: bootstrap/php-fpm.main.yml
56
- include: bootstrap/php-fpm.pool.yml
67
- include: bootstrap/php-fpm.yml
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
3+
#############################
4+
# Workaround PHP configuration files
5+
# for alpine
6+
#############################
7+
8+
- name: Get list of PHP5 configuration files
9+
command: "ls /etc/php5/conf.d/ |grep .ini"
10+
register: php5_ini
11+
when: ansible_distribution == 'Alpine'
12+
ignore_errors: yes
13+
14+
- name: Link configuration files from php5 to php
15+
file:
16+
src: '/etc/php5/conf.d/{{ item }}'
17+
dest: '/etc/php/conf.d/{{ item }}'
18+
state: link
19+
with_items: "{{ php5_ini.stdout_lines }}"
20+
when: ansible_distribution == 'Alpine' and php5_ini is defined
21+
ignore_errors: yes
22+
23+
#############################
24+
# Workaround PHP module files
25+
# for alpine
26+
#############################
27+
28+
- name: Get list of PHP5 modules
29+
command: "ls /usr/lib/php5/modules/ |grep .so"
30+
register: php5_modules
31+
when: ansible_distribution == 'Alpine'
32+
ignore_errors: yes
33+
34+
- name: Link module files from php5 to php
35+
file:
36+
src: '/usr/lib/php5/modules/{{ item }}'
37+
dest: '/usr/lib/php/modules/{{ item }}'
38+
state: link
39+
with_items: "{{ php5_modules.stdout_lines }}"
40+
when: ansible_distribution == 'Alpine' and php5_modules is defined
41+
ignore_errors: yes
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
3+
#############################
4+
# Workaround PHP configuration files
5+
# for alpine
6+
#############################
7+
8+
- name: Get list of PHP5 configuration files
9+
command: "ls /etc/php5/conf.d/ |grep .ini"
10+
register: php5_ini
11+
when: ansible_distribution == 'Alpine'
12+
ignore_errors: yes
13+
14+
- name: Link configuration files from php5 to php
15+
file:
16+
src: '/etc/php5/conf.d/{{ item }}'
17+
dest: '/etc/php/conf.d/{{ item }}'
18+
state: link
19+
with_items: "{{ php5_ini.stdout_lines }}"
20+
when: ansible_distribution == 'Alpine' and php5_ini is defined
21+
ignore_errors: yes
22+
23+
#############################
24+
# Workaround PHP module files
25+
# for alpine
26+
#############################
27+
28+
- name: Get list of PHP5 modules
29+
command: "ls /usr/lib/php5/modules/ |grep .so"
30+
register: php5_modules
31+
when: ansible_distribution == 'Alpine'
32+
ignore_errors: yes
33+
34+
- name: Link module files from php5 to php
35+
file:
36+
src: '/usr/lib/php5/modules/{{ item }}'
37+
dest: '/usr/lib/php/modules/{{ item }}'
38+
state: link
39+
with_items: "{{ php5_modules.stdout_lines }}"
40+
when: ansible_distribution == 'Alpine' and php5_modules is defined
41+
ignore_errors: yes

0 commit comments

Comments
 (0)