Я пытаюсь выполнить следующую задачу с помощью aws cli, поскольку модуль aws_s3
выводит все ключи корзины. Тем не менее, я получаю aws: not found
ошибка.
aws cli
установлен правильно, потому что выполнение той же команды с хоста работает нормально.
Моя задача:
- name: Try list
shell: aws s3 ls "{{ s3_bucket }}"
Полная ошибка:
fatal: [cassandra-node-1]: FAILED! => {
"changed": true,
"cmd": "aws s3 ls \"cassandra-snapshotter-test2\"",
"delta": "0:00:00.002900",
"end": "2019-05-12 13:48:25.705324",
"invocation": {
"module_args": {
"_raw_params": "aws s3 ls \"cassandra-snapshotter-test2\"",
"_uses_shell": true,
"argv": null,
"chdir": null,
"creates": null,
"executable": null,
"removes": null,
"stdin": null,
"warn": true
}
},
"msg": "non-zero return code",
"rc": 127,
"start": "2019-05-12 13:48:25.702424",
"stderr": "/bin/sh: 1: aws: not found",
"stderr_lines": [
"/bin/sh: 1: aws: not found"
],
"stdout": "",
"stdout_lines": []
}
Почему я не могу запустить aws cli из задачи Ansible?