Парни, никто с этой проблемой не встречался в >=2.5.0? https://github.com/ansible/ansible/issues/38702 Если коротко: "To further clarify: I run the initial script as 'root' and then 'down power' to another user (admin in this case). I have roots homedir set to o-rwx g-rwx so ansible can't become the user and continue on the scripts. Seems to work fine 2.4.2, however, but in 2.5.0 fails miserably."
Привет, посоветуйте, как скопировать файлы с серверов по маске. команда ansible -m fetch -a "src=/tmp/*.txt dest=/tmp" all /tmp" all не работает, выдаёт ошибку "msg": "file not found: /tmp/*.txt"
Привет, посоветуйте, как скопировать файлы с серверов по маске. команда ansible -m fetch -a "src=/tmp/*.txt dest=/tmp" all /tmp" all не работает, выдаёт ошибку "msg": "file not found: /tmp/*.txt"
Может этот модуль только с одним файлом работает? Используйте поиск файлов, сбор имён в список и with_items: "{{ listoffiles}}"
@stonemct , пока что вы написали сложно для меня. Решил вопрос такой командой, без Ансибла: for i in {server01,server02}; do scp root@$i:/tmp/*.txt /tmp/; done