mirror of
https://github.com/geerlingguy/ansible-role-php.git
synced 2024-11-24 12:06:02 +01:00
Fixes #219: Fix source build failure on Ansible 2.4+.
This commit is contained in:
parent
21b3d58fba
commit
462ebfaabf
@ -25,7 +25,7 @@ php_fpm_pm_max_spare_servers: 5
|
||||
# The executable to run when calling PHP from the command line.
|
||||
php_executable: "php"
|
||||
|
||||
# OpCache settings (useful for PHP >=5.5).
|
||||
# OpCache settings.
|
||||
php_opcache_zend_extension: "opcache.so"
|
||||
php_opcache_enable: "1"
|
||||
php_opcache_enable_cli: "0"
|
||||
@ -81,6 +81,7 @@ php_display_startup_errors: "Off"
|
||||
|
||||
# Install PHP from source (instead of using a package manager) with these vars.
|
||||
php_install_from_source: false
|
||||
php_source_repo: "https://git.php.net/repository/php-src.git"
|
||||
php_source_version: "master"
|
||||
php_source_clone_dir: "~/php-src"
|
||||
php_source_clone_depth: 1
|
||||
|
@ -78,31 +78,31 @@
|
||||
|
||||
- name: Clone the PHP repository.
|
||||
git:
|
||||
repo: https://git.php.net/repository/php-src.git
|
||||
repo: "{{ php_source_repo }}"
|
||||
dest: "{{ php_source_clone_dir }}"
|
||||
version: "{{ php_source_version }}"
|
||||
accept_hostkey: yes
|
||||
depth: "{{ php_source_clone_depth }}"
|
||||
when: php_installed|failed
|
||||
when: php_installed.rc != 0
|
||||
|
||||
- name: Ensure PHP installation path exists.
|
||||
file:
|
||||
path: "{{ php_source_install_path }}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
when: php_installed|failed
|
||||
when: php_installed.rc != 0
|
||||
|
||||
- name: Build configure script.
|
||||
shell: >
|
||||
./buildconf --force
|
||||
chdir={{ php_source_clone_dir }}
|
||||
when: php_installed|failed
|
||||
when: php_installed.rc != 0
|
||||
|
||||
- name: Run configure script.
|
||||
shell: >
|
||||
{{ php_source_configure_command }}
|
||||
chdir={{ php_source_clone_dir }}
|
||||
when: php_installed|failed
|
||||
when: php_installed.rc != 0
|
||||
|
||||
- name: Make and install PHP.
|
||||
shell: >
|
||||
@ -111,7 +111,7 @@
|
||||
with_items:
|
||||
- "{{ php_source_make_command }}"
|
||||
- make install
|
||||
when: php_installed|failed
|
||||
when: php_installed.rc != 0
|
||||
|
||||
- name: Ensure php executable is symlinked into a standard path.
|
||||
file:
|
||||
|
@ -5,10 +5,8 @@
|
||||
php_enable_webserver: false
|
||||
php_install_from_source: true
|
||||
php_source_clone_dir: /root/php-src
|
||||
# Workaround for https://github.com/ansible/ansible-modules-core/issues/5457
|
||||
php_source_clone_depth: 0
|
||||
php_source_make_command: "make --jobs=2"
|
||||
php_source_version: "php-7.0.13"
|
||||
php_source_version: "php-7.1.9"
|
||||
php_memory_limit: "192M"
|
||||
|
||||
pre_tasks:
|
||||
|
Loading…
Reference in New Issue
Block a user