Код: Выделить всё
Failed to create temporary directory. In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in \"/tmp\", for more error information use -vvv. Failed command was: ( umask 77 && mkdir -p etc...
Вот весь вывод команды ansible host -i hosts -m ping -vvv:
Код: Выделить всё
ansible [core 2.14.16]
config file = /home/user/.config/ansible.cfg
configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
ansible collection location = /home/user/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.11.2 (main, Sep 14 2024, 03:00:30) [GCC 12.2.0] (/usr/bin/python3)
jinja version = 3.1.2
libyaml = True
Using /home/user/.config/ansible.cfg as config file
host_list declined parsing /home/user/repos/home-data/ansible/hosts as it did not pass its verify_file() method
script declined parsing /home/user/repos/home-data/ansible/hosts as it did not pass its verify_file() method
auto declined parsing /home/user/repos/home-data/ansible/hosts as it did not pass its verify_file() method
Parsed /home/user/repos/home-data/ansible/hosts inventory source with ini plugin
[WARNING]: Found both group and host with same name: controller
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
ESTABLISH SSH CONNECTION FOR USER: None
SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o 'ControlPath="/home/user/.ansible/cp/4206769e43"' host.tld '/bin/bash -c '"'"'( umask 77 && mkdir -p "` echo /tmp/ansible `"&& mkdir "` echo /tmp/ansible/ansible-tmp-1733091413.8547559-55083-111918178668141 `" && echo ansible-tmp-1733091413.8547559-55083-111918178668141="` echo /tmp/ansible/ansible-tmp-1733091413.8547559-55083-111918178668141 `" ) && sleep 0'"'"''
(127, b'', b'/bin/bash: line 1: mkdir: command not found\n')
Failed to connect to the host via ssh: /bin/bash: line 1: mkdir: command not found
worker1 | UNREACHABLE! => {
"changed": false,
"msg": "Failed to create temporary directory. In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in \"/tmp\", for more error information use -vvv. Failed command was: ( umask 77 && mkdir -p \"` echo /tmp/ansible `\"&& mkdir \"` echo /tmp/ansible/ansible-tmp-1733091413.8547559-55083-111918178668141 `\" && echo ansible-tmp-1733091413.8547559-55083-111918178668141=\"` echo /tmp/ansible/ansible-tmp-1733091413.8547559-55083-111918178668141 `\" ), exited with result 127",
"unreachable": true
}
Я также попробовал установить оболочку /bin/bash. Вот мой файл хостов:
Код: Выделить всё
[controller]
controller ansible_host=clustercontroller.home ansible_shell_executable=/bin/bash
[workers]
worker1 ansible_host=clusterworker1.home ansible_shell_executable=/bin/bash
worker2 ansible_host=clusterworker2.home ansible_shell_executable=/bin/bash
worker3 ansible_host=clusterworker3.home ansible_shell_executable=/bin/bash
Подробнее здесь: https://stackoverflow.com/questions/792 ... -directory
Мобильная версия