Skip to content

Commit

Permalink
fix: 不再移除安装失败的版本
Browse files Browse the repository at this point in the history
BREAKING CHANGE: 不会再移除安装失败的版本
  • Loading branch information
daixijun committed Mar 30, 2020
1 parent 5debfff commit b648a71
Show file tree
Hide file tree
Showing 3 changed files with 207 additions and 229 deletions.
42 changes: 42 additions & 0 deletions tasks/install_libzip.yaml
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
Loading

0 comments on commit b648a71

Please sign in to comment.