Skip to content

Commit

Permalink
fix: 修复目录权限幂等性问题
Browse files Browse the repository at this point in the history
添加 libzip 安装包 checksum支持
  • Loading branch information
daixijun committed Apr 21, 2020
1 parent 75ab907 commit 14ac388
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__pycache__/
files/*.tar.gz
*.tar.gz
2 changes: 0 additions & 2 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@
hosts: all
roles:
- role: daixijun.php
# php_version: 7.3.13
# php_force_install: true
3 changes: 3 additions & 0 deletions tasks/install_libzip.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
get_url:
url: "{{ php_libzip_download_url }}"
dest: "{{ playbook_dir }}/files/{{ php_libzip_download_url|basename }}"
checksum: md5:{{ php_libzip_checksums[php_libzip_version] }}
timeout: 120
become: false
run_once: true
Expand All @@ -21,6 +22,8 @@
src: "files/{{ php_libzip_download_url | basename }}"
dest: /usr/local/src
creates: /usr/local/src/libzip-{{ php_libzip_version }}
owner: "{{ php_web_user }}"
group: "{{ php_web_user }}"
remote_src: false
register: libzip_unarchive
when:
Expand Down
5 changes: 2 additions & 3 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,14 @@
state: directory
owner: "{{ php_web_user }}"
group: "{{ php_web_user }}"
recurse: True
mode: "755"
mode: 0755
loop:
- "{{ php_log_path }}"
- "{{ php_fpm_pid | dirname }}"
- "/usr/local/php-{{ php_version }}/etc/php.d"
- "/usr/local/php-{{ php_version }}/etc/php-fpm.d"

- name: Copy php-fpm configuration files
- name: Generator php configuration files
template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
Expand Down
10 changes: 10 additions & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
---
# vars file for php
php_libzip_checksums:
1.3.0: 8921860aa46437b6a017928f694014b9
1.3.1: d231a10881e383bcdea1c401f8842ff1
1.3.2: ba6a918b403bb26d14c25d580346a806
1.4.0: f31cbec30a5fdbbc8a7d4f5f72d719e7
1.5.0: 61c75b53066d82d2a24d6c44b77eef18
1.5.1: ca72a4c93bef1595e5ff45eaf534d4da
1.5.2: 8db7145801889ecf7ab481b23d6487cd
1.6.0: b29d2fa203afd47e3b6e9dad7bb583cb
1.6.1: 43883accb207d977462aed9fed40b30b

0 comments on commit 14ac388

Please sign in to comment.