Ansible - 取消存档模块无法与繁忙的盒子工具一起使用

问题描述 投票:0回答:1

我正在尝试在具有繁忙框的嵌入式系统上解压缩文件。

- name: Unarchive media files
  unarchive:
    src: /home/root/archive.zip
    dest: /home/root/
    remote_src: yes

我收到以下错误:

fatal: [10.0.6.41]: FAILED! => {"changed": false, "msg": "Failed to find handler for \"/home/root/archive.zip\". Make sure the required command to extract the file is installed.\nCommand \"/bin/tar\" detected as tar type None. GNU tar required.\nCommand \"unzip -Z\" could not handle archive: /usr/bin/unzip: invalid option -- 'Z'\nBusyBox v1.31.1 () multi-call binary.\n\nUsage: unzip [-lnojpq] FILE[.zip] [FILE]... [-x FILE...] [-d DIR]\n\nUnable to find required 'zipinfo' binary in the path."}

好像需要GNU tar?如果我直接在远程源的命令行上运行

unzip archive.zip
,它就可以工作。

ansible busybox
1个回答
0
投票

日志的最后一部分说明了一切:

Unable to find required 'zipinfo' binary in the path

Ansible 尝试运行

unzip -Z
,与
zipinfo
相同。

来自

unarchive
模块 文档

需要目标主机上的

zipinfo
gtar
/
unzip
命令。

© www.soinside.com 2019 - 2024. All rights reserved.