ו
слушай, а ансибл не может например попытаться резолвить имя хоста через днс, даже если ip прямо указан в инвентори? у меня через днс эти хостнеймы ведут на другие серверы
Size: a a a
ו
DK
ו
DK
DK
DK
ו
DK
DK
ו
GK
- name: test become
shell: "whoami"
register: shell_result
become_user: jenkins
- debug:
msg: "{{shell_result.stdout}}"
TASK [debug] ***********************************************************************************************************************************
ok: [test-vm] => {
"msg": "george"
}
PP
GK
I
GK
GK
fatal: [test-vm]: UNREACHABLE! => {"changed": false, "msg": "Authentication or permission failure. In some cases, you may ha
ve been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a pat
h rooted in \"/tmp\". Failed command was: ( umask 77 && mkdir -p \"` echo /var/tmp/ansible-tmp-1595412196.294242-18928345142486 `\" && echo ansi
ble-tmp-1595412196.294242-18928345142486=\"` echo /var/tmp/ansible-tmp-1595412196.294242-18928345142486 `\" ), exited with result 1", "unreachab
le": true}
I
GK
GK
FAILED! => {"msg": "Failed to set permissions on the temporary files Ansible needs to create when becoming
an unprivileged user (rc: 1, err: chown: changing ownership of '/var/tmp/ansible-tmp-1595412013.979855-144795728313297/': Operation not permitt
ed\nchown: changing ownership of '/var/tmp/ansible-tmp-1595412013.979855-144795728313297/AnsiballZ_command.py': Operation not permitted\n}). For
information on working around this, see https://docs.ansible.com/ansible/become.html#becoming-an-unprivileged-user"}