-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE: 不会再移除安装失败的版本
- Loading branch information
Showing
3 changed files
with
207 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
- name: Verify that libzip is installed | ||
stat: | ||
path: /usr/local/libzip | ||
register: libzip_install_stat | ||
|
||
- name: Download libzip package | ||
get_url: | ||
url: "{{ php_libzip_download_url }}" | ||
dest: "{{ role_path }}/files/" | ||
timeout: 120 | ||
become: false | ||
run_once: true | ||
delegate_to: localhost | ||
register: _php_libzip_package | ||
when: | ||
- not libzip_install_stat.stat.exists | ||
|
||
- name: Unarchive libzip | ||
unarchive: | ||
src: "files/{{ php_libzip_download_url | basename }}" | ||
dest: /usr/local/src | ||
creates: /usr/local/src/libzip-{{ php_libzip_version }} | ||
remote_src: false | ||
register: libzip_unarchive | ||
when: | ||
- not libzip_install_stat.stat.exists | ||
- _php_libzip_package is not skipped | ||
|
||
- name: Install libzip | ||
shell: "{{ item }}" | ||
args: | ||
chdir: /usr/local/src/libzip-{{ php_libzip_version }} | ||
loop: | ||
- ./configure --prefix=/usr/local/libzip | ||
- make | ||
- make install | ||
when: | ||
- libzip_unarchive is changed | ||
- php_libzip_version is version("1.4.0", operator="<") | ||
tags: | ||
- skip_ansible_lint |
Oops, something went wrong.