Hi!

On Sun, 18 Aug 2019 04:32:33 -0700 (PDT)
Владимир Куликов <[email protected]> wrote:
> Hi!
> After tuning connect from master ansible server to target HP-UX server 
> (HP-UX 11.31 ia64 server with installed Python 2.7.16) by SSH (ssh HPUX - 
> without password), i try a test:
>
> #ssh hp-ux
> (get connected without password)
> 
> and next:
> #ansible hpux -m ping
> 
> I get an error:
> hpux | UNREACHABLE! => {
>     "changed": false, 
>     "msg": "Authentication or permission failure. 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\". Failed command was: ( umask 77 && mkdir -p \"` echo 
> /tmp/ansible/ansible-tmp-1566126836.8-256406273673570 `\" && echo 
> ansible-tmp-1566126836.8-256406273673570=\"` echo 
> /tmp/ansible/ansible-tmp-1566126836.8-256406273673570 `\" ), exited with 
> result 235, stdout output: 
> ansible-tmp-1566126836.8-256406273673570=/tmp/ansible/ansible-tmp-1566126836.8-256406273673570\n",
>  
>     "unreachable": true
> }
> 
> I think so it may be syntax error  of remote command by ssh for HP-UX 
> shell.... Is it so or not? Anyone can help me?

The problem is "permission failure". You are not able to write to
DEFAULT_LOCAL_TMP (see
https://docs.ansible.com/ansible/latest/reference_appendices/config.html#default-local-tmp).

Default value is "~/.ansible/tmp". You might want to log to the remote and
fix the permissions, or, as suggested in the message, "Consider changing the
remote tmp path in ansible.cfg to a path rooted in "/tmp".

There are security implications of who will be able to read the tmp files
created by Ansible (see
https://docs.ansible.com/ansible/latest/user_guide/become.html#becoming-an-unprivileged-user).

In this case you might want to use pipelining. Quoting from the link above:
"Use pipelining. When pipelining is enabled, Ansible doesn’t save the module
to a temporary file on the client. Instead it pipes the module to the remote
python interpreter’s stdin. Pipelining does not work for python modules
involving file transfer (for example: copy, fetch, template), or for
non-python modules."

Cheers,

        -vlado

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/20190818142500.28df6a47%40gmail.com.

Attachment: pgpxvUGTlzvAv.pgp
Description: OpenPGP digital signature

Reply via email to