mirror of
https://github.com/geerlingguy/ansible-role-php.git
synced 2025-02-14 00:52:03 +01:00
Clone from source only when PHP is not installed.
This commit is contained in:
parent
7da296dd4f
commit
4c7dc8509e
@ -52,6 +52,12 @@
|
|||||||
state: link
|
state: link
|
||||||
when: gmp_file.stat.exists == false
|
when: gmp_file.stat.exists == false
|
||||||
|
|
||||||
|
- name: Check if PHP is installed.
|
||||||
|
command: which php
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
register: php_installed
|
||||||
|
|
||||||
- name: Clone the PHP repository.
|
- name: Clone the PHP repository.
|
||||||
git:
|
git:
|
||||||
repo: https://git.php.net/repository/php-src.git
|
repo: https://git.php.net/repository/php-src.git
|
||||||
@ -59,13 +65,7 @@
|
|||||||
version: "{{ php_source_version }}"
|
version: "{{ php_source_version }}"
|
||||||
accept_hostkey: yes
|
accept_hostkey: yes
|
||||||
depth: 1
|
depth: 1
|
||||||
force: yes
|
when: php_installed|failed
|
||||||
|
|
||||||
- name: Check if PHP is installed.
|
|
||||||
command: which php
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: php_installed
|
|
||||||
|
|
||||||
- name: Ensure PHP installation path exists.
|
- name: Ensure PHP installation path exists.
|
||||||
file:
|
file:
|
||||||
|
Loading…
Reference in New Issue
Block a user