# Totally Stuck...

**URL:** <https://forum.ansible.com/t/totally-stuck/16375>\
**Category:** Ansible Project\
**Created:** [September 29, 2014, 7:31pm UTC](https://forum.ansible.com/t/totally-stuck/16375 "2014-09-29T19:31:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tiglath](https://avatars.discourse-cdn.com/v4/letter/t/df705f/32.png) [@Tiglath](https://forum.ansible.com/u/Tiglath)\
**Post date:** [September 29, 2014, 7:31pm UTC](https://forum.ansible.com/t/totally-stuck/16375/1 "2014-09-29T19:31:36Z")

</div>

This is a real blocker. SSH works but Ansible does not.

In the debug output I see '‘PasswordAuthentication=no’ and that looks wrong.

Any ideas?

Thanks

---

<div class="post-metadata">

**Author:** ![Timothy\_Gerla](https://avatars.discourse-cdn.com/v4/letter/t/977dab/32.png) [@Timothy\_Gerla](https://forum.ansible.com/u/Timothy_Gerla)\
**Post date:** [September 29, 2014, 7:37pm UTC](https://forum.ansible.com/t/totally-stuck/16375/2 "2014-09-29T19:37:00Z")

</div>

> --------------------------------------
> 
> $: ansible venus -vvvv -i hosts -m shell -a "mkdir /tmp/core; cd /tcp;  
> sudo mv /tmp/core ." --sudo -K
> 
> sudo password: \<pwd\>

Looks like you are asking to be prompted for a sudo password ('-K') but not  
an SSH password ('-k') -- so it's not going to be trying for password auth.

-Tim

---

<div class="post-metadata">

**Author:** ![Tiglath](https://avatars.discourse-cdn.com/v4/letter/t/df705f/32.png) [@Tiglath](https://forum.ansible.com/u/Tiglath)\
**Post date:** [September 29, 2014, 7:56pm UTC](https://forum.ansible.com/t/totally-stuck/16375/3 "2014-09-29T19:56:48Z")

</div>

Thank you for your reply.

I did not explain myself too well. Sorry.

I don’t need SSH authentication, only sudo.

So we have two authentications. SSH proceeds without password using keys, but sudo needa a password, which I give at the prompt.

What other password is it waiting for, as mentioned in the error message?

---

<div class="post-metadata">

**Author:** ![adam2](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@adam2](https://forum.ansible.com/u/adam2)\
**Post date:** [September 29, 2014, 8:04pm UTC](https://forum.ansible.com/t/totally-stuck/16375/4 "2014-09-29T20:04:32Z")

</div>

You can't call sudo from the shell module.

The play would normal be like this:

....  
tasks:  
....  
&nbsp;&nbsp;- name: foo  
&nbsp;&nbsp;&nbsp;&nbsp;sudo: true  
&nbsp;&nbsp;&nbsp;&nbsp;sudo\_user: root  
&nbsp;&nbsp;&nbsp;&nbsp;file: state=directory dest=/tcp/core  
....

---

<div class="post-metadata">

**Author:** ![Tiglath](https://avatars.discourse-cdn.com/v4/letter/t/df705f/32.png) [@Tiglath](https://forum.ansible.com/u/Tiglath)\
**Post date:** [October 2, 2014, 9:20pm UTC](https://forum.ansible.com/t/totally-stuck/16375/5 "2014-10-02T21:20:50Z")

</div>

Thank you for your time.

I followed your syntax, same results. Bummer.

command:

ansible-playbook -K -vvvv -i hosts apps/tcpredirector/deploy2.yml

Playbook:
