Я управляю AmazonLinux2 на EC2, используя Ansible.
Однако, когда команда Unarchive выполнена, появляется следующая ошибка.
"Failed to find handler for \"/tmp/hoge.db.gz\".
Make sure the required command to extract the file is installed.
Command \"/usr/bin/unzip\" could not handle archive. Command \"/usr/bin/gtar\" could not handle archive."
Содержимое PlayBook:
- name: Unarchive hoge
become: yes
unarchive:
src: /tmp/hoge.db.gz
dest: /root/fuga/
remote_src: yes
Ниже приведена информация, которую я изучил, чтобы определить причину ошибки.
- Разархивировать Требуется Command
[root@ip- ~]# which gtar
/usr/bin/gtar
[root@ip- ~]# which unzip
/usr/bin/unzip
[root@ip- ~]# which zipinfo
/usr/bin/zipinfo
- debug:
var: ansible_env.PATH
"ansible_env.PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin"
Я буду ждать вашего ответа