Skip to content
This repository was archived by the owner on Feb 13, 2023. It is now read-only.

Commit 9f68a07

Browse files
committed
Updated PHP role to latest version.
1 parent 1a7728c commit 9f68a07

File tree

8 files changed

+22
-46
lines changed

8 files changed

+22
-46
lines changed

provisioning/requirements.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
- src: geerlingguy.nodejs
4343
version: 4.1.2
4444
- src: geerlingguy.php
45-
version: 3.4.5
45+
version: 3.5.0
4646
- src: geerlingguy.php-memcached
4747
version: 2.0.0
4848
- src: geerlingguy.php-mysql

provisioning/roles/geerlingguy.php/.travis.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,14 @@ env:
1818
- distro: ubuntu1404
1919
playbook: test.yml
2020
php_version: 7.0
21-
- distro: ubuntu1204
22-
playbook: test.yml
23-
php_version: 5.6
2421

2522
# Only test source install on latest supported OSes.
2623
- distro: centos7
2724
playbook: test-source.yml
28-
php_version: 7.0.13
25+
php_version: 7.1.9
2926
- distro: ubuntu1604
3027
playbook: test-source.yml
31-
php_version: 7.0.13
28+
php_version: 7.1.9
3229

3330
script:
3431
# Configure test script so we can run extra tests after playbook is run.

provisioning/roles/geerlingguy.php/defaults/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ php_fpm_pm_max_spare_servers: 5
2525
# The executable to run when calling PHP from the command line.
2626
php_executable: "php"
2727

28-
# OpCache settings (useful for PHP >=5.5).
28+
# OpCache settings.
2929
php_opcache_zend_extension: "opcache.so"
3030
php_opcache_enable: "1"
3131
php_opcache_enable_cli: "0"
@@ -81,6 +81,7 @@ php_display_startup_errors: "Off"
8181

8282
# Install PHP from source (instead of using a package manager) with these vars.
8383
php_install_from_source: false
84+
php_source_repo: "https://git.php.net/repository/php-src.git"
8485
php_source_version: "master"
8586
php_source_clone_dir: "~/php-src"
8687
php_source_clone_depth: 1

provisioning/roles/geerlingguy.php/meta/main.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,15 @@ galaxy_info:
2020
- all
2121
- name: Ubuntu
2222
versions:
23-
- all
23+
- trusty
24+
- xenial
2425
galaxy_tags:
2526
- development
2627
- web
28+
- php
29+
- language
30+
- fpm
31+
- drupal
32+
- wordpress
33+
- joomla
34+
- magento

provisioning/roles/geerlingguy.php/tasks/install-from-source.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,31 +78,31 @@
7878

7979
- name: Clone the PHP repository.
8080
git:
81-
repo: https://git.php.net/repository/php-src.git
81+
repo: "{{ php_source_repo }}"
8282
dest: "{{ php_source_clone_dir }}"
8383
version: "{{ php_source_version }}"
8484
accept_hostkey: yes
8585
depth: "{{ php_source_clone_depth }}"
86-
when: php_installed|failed
86+
when: php_installed.rc != 0
8787

8888
- name: Ensure PHP installation path exists.
8989
file:
9090
path: "{{ php_source_install_path }}"
9191
state: directory
9292
mode: 0755
93-
when: php_installed|failed
93+
when: php_installed.rc != 0
9494

9595
- name: Build configure script.
9696
shell: >
9797
./buildconf --force
9898
chdir={{ php_source_clone_dir }}
99-
when: php_installed|failed
99+
when: php_installed.rc != 0
100100

101101
- name: Run configure script.
102102
shell: >
103103
{{ php_source_configure_command }}
104104
chdir={{ php_source_clone_dir }}
105-
when: php_installed|failed
105+
when: php_installed.rc != 0
106106

107107
- name: Make and install PHP.
108108
shell: >
@@ -111,7 +111,7 @@
111111
with_items:
112112
- "{{ php_source_make_command }}"
113113
- make install
114-
when: php_installed|failed
114+
when: php_installed.rc != 0
115115

116116
- name: Ensure php executable is symlinked into a standard path.
117117
file:

provisioning/roles/geerlingguy.php/tests/test-source.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
php_enable_webserver: false
66
php_install_from_source: true
77
php_source_clone_dir: /root/php-src
8-
# Workaround for https://github.com/ansible/ansible-modules-core/issues/5457
9-
php_source_clone_depth: 0
108
php_source_make_command: "make --jobs=2"
11-
php_source_version: "php-7.0.13"
9+
php_source_version: "php-7.1.9"
1210
php_memory_limit: "192M"
1311

1412
pre_tasks:

provisioning/roles/geerlingguy.php/tests/test-vars-ubuntu1204.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

provisioning/roles/geerlingguy.php/tests/test.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,9 @@
1515
changed_when: false
1616

1717
# Ubuntu-specific tasks.
18-
- include_vars: test-vars-ubuntu1204.yml
19-
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '12.04'
20-
2118
- name: Add repository for PHP 7.
2219
apt_repository: repo='ppa:ondrej/php'
23-
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version != '12.04'
24-
25-
- name: Add repository for PHP 5.6.
26-
apt_repository: repo='ppa:ondrej/php'
27-
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '12.04'
20+
when: ansible_distribution == 'Ubuntu'
2821

2922
# Debian-specific tasks.
3023
- name: Add dependencies for PHP versions (Debian).

0 commit comments

Comments
 (0)