mirror of
https://github.com/geerlingguy/ansible-role-php.git
synced 2025-02-18 01:31:46 +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.
|
# The executable to run when calling PHP from the command line.
|
||||||
php_executable: "php"
|
php_executable: "php"
|
||||||
|
|
||||||
# OpCache settings (useful for PHP >=5.5).
|
# OpCache settings.
|
||||||
php_opcache_zend_extension: "opcache.so"
|
php_opcache_zend_extension: "opcache.so"
|
||||||
php_opcache_enable: "1"
|
php_opcache_enable: "1"
|
||||||
php_opcache_enable_cli: "0"
|
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.
|
# Install PHP from source (instead of using a package manager) with these vars.
|
||||||
php_install_from_source: false
|
php_install_from_source: false
|
||||||
|
php_source_repo: "https://git.php.net/repository/php-src.git"
|
||||||
php_source_version: "master"
|
php_source_version: "master"
|
||||||
php_source_clone_dir: "~/php-src"
|
php_source_clone_dir: "~/php-src"
|
||||||
php_source_clone_depth: 1
|
php_source_clone_depth: 1
|
||||||
|
@ -78,31 +78,31 @@
|
|||||||
|
|
||||||
- name: Clone the PHP repository.
|
- name: Clone the PHP repository.
|
||||||
git:
|
git:
|
||||||
repo: https://git.php.net/repository/php-src.git
|
repo: "{{ php_source_repo }}"
|
||||||
dest: "{{ php_source_clone_dir }}"
|
dest: "{{ php_source_clone_dir }}"
|
||||||
version: "{{ php_source_version }}"
|
version: "{{ php_source_version }}"
|
||||||
accept_hostkey: yes
|
accept_hostkey: yes
|
||||||
depth: "{{ php_source_clone_depth }}"
|
depth: "{{ php_source_clone_depth }}"
|
||||||
when: php_installed|failed
|
when: php_installed.rc != 0
|
||||||
|
|
||||||
- name: Ensure PHP installation path exists.
|
- name: Ensure PHP installation path exists.
|
||||||
file:
|
file:
|
||||||
path: "{{ php_source_install_path }}"
|
path: "{{ php_source_install_path }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0755
|
mode: 0755
|
||||||
when: php_installed|failed
|
when: php_installed.rc != 0
|
||||||
|
|
||||||
- name: Build configure script.
|
- name: Build configure script.
|
||||||
shell: >
|
shell: >
|
||||||
./buildconf --force
|
./buildconf --force
|
||||||
chdir={{ php_source_clone_dir }}
|
chdir={{ php_source_clone_dir }}
|
||||||
when: php_installed|failed
|
when: php_installed.rc != 0
|
||||||
|
|
||||||
- name: Run configure script.
|
- name: Run configure script.
|
||||||
shell: >
|
shell: >
|
||||||
{{ php_source_configure_command }}
|
{{ php_source_configure_command }}
|
||||||
chdir={{ php_source_clone_dir }}
|
chdir={{ php_source_clone_dir }}
|
||||||
when: php_installed|failed
|
when: php_installed.rc != 0
|
||||||
|
|
||||||
- name: Make and install PHP.
|
- name: Make and install PHP.
|
||||||
shell: >
|
shell: >
|
||||||
@ -111,7 +111,7 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- "{{ php_source_make_command }}"
|
- "{{ php_source_make_command }}"
|
||||||
- make install
|
- make install
|
||||||
when: php_installed|failed
|
when: php_installed.rc != 0
|
||||||
|
|
||||||
- name: Ensure php executable is symlinked into a standard path.
|
- name: Ensure php executable is symlinked into a standard path.
|
||||||
file:
|
file:
|
||||||
|
@ -5,10 +5,8 @@
|
|||||||
php_enable_webserver: false
|
php_enable_webserver: false
|
||||||
php_install_from_source: true
|
php_install_from_source: true
|
||||||
php_source_clone_dir: /root/php-src
|
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_make_command: "make --jobs=2"
|
||||||
php_source_version: "php-7.0.13"
|
php_source_version: "php-7.1.9"
|
||||||
php_memory_limit: "192M"
|
php_memory_limit: "192M"
|
||||||
|
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
|
Loading…
Reference in New Issue
Block a user