Есть ли какой-либо параметр, который может изменить это и заставить модуль извлекать tar из /opt/mypath/bin/tar?
Я также пытался установить переменную $PATH, но ничего не помогло.Моя задача:
Код: Выделить всё
- name: Extract my tar file
environment:
PATH: "/opt/mypath/bin/tar:/usr/bin:/etc:/usr/sbin"
unarchive:
src: "/path/to/my/source/tar/file"
dest: "/path/to/be/extracted"
remote_src: yes
Код: Выделить всё
fatal: [mychildserver]: FAILED! => {"changed": false, "msg": "Failed
to find handler for \"/path/to/my/source/tar/file\". Make sure the
required command to extract the file is installed.\nCommand
\"/usr/bin/tar\" detected as tar type None. GNU tar required.\nCommand
\"/usr/bin/unzip\" could not handle archive: End-of-central-directory
signature not found.
https://docs.ansible.com/ansible/latest ... ns/ansible /builtin/unarchive_module.html
Подробнее здесь: https://stackoverflow.com/questions/787 ... e-this-set
Мобильная версия