Since you are the karol user, why do you have to elevate the privilege by
adding sudo before ansible-playbook only to downgrade it to karol with -u
and then upgrade to root with --become?
Why can't you just run
ansible-playbook -i hosts playbook.yml without the "sudo", "-u karol" or
"--become" ?
Has anyone else been able to connect to 10.0.2.15 with ansible-playbook
without any issue?
I would try using the ping module to test the connectivity so it doesn't
require sudo access.
Another thing to try is to use ssh key instead of username/password to see
if it makes any difference.
On Thursday, December 20, 2018 at 1:23:17 PM UTC-8, Karol Ołtarzewski wrote:
>
> Good morning I have following question when I want to run Ansible-playbook
> by it:
> sudo ansible-playbook -i hosts playbook.yml -u karol -k --become -K
> I am getting following error:
> fatal: [10.0.2.15]: 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
> /home/karol/.ansible/tmp/ansible-tmp-1545340576.76-196881409171208 `\" &&
> echo ansible-tmp-1545340576.76-196881409171208=\"` echo
> /home/karol/.ansible/tmp/ansible-tmp-1545340576.76-196881409171208 `\" ),
> exited with result 1", "unreachable": true}
> I can ssh to 10.0.2.15 without any issue.
> What may be reason of my problem?
> I was following steps from this place:
> https://github.com/openwisp/ansible-openwisp2#ansible-openwisp2
>
>
>
>
>
--
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/0a1e2fc2-6133-400a-a792-d64fc9fbf5ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.