You can't call sudo from the shell module.

The play would normal be like this:

....
tasks:
....
 - name: foo
   sudo: true
   sudo_user: root
   file: state=directory dest=/tcp/core
....

On 09/29/2014 02:56 PM, Tiglath wrote:

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?
On Monday, September 29, 2014 3:37:25 PM UTC-4, Timothy Gerla wrote:

        --------------------------------------

        $:  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
-- Tim Gerla
    t...@gerla.net <javascript:>

--
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 ansible-project+unsubscr...@googlegroups.com <mailto:ansible-project+unsubscr...@googlegroups.com>. To post to this group, send email to ansible-project@googlegroups.com <mailto:ansible-project@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/12ac254d-f4bd-407d-ad46-509e9a33e2c1%40googlegroups.com <https://groups.google.com/d/msgid/ansible-project/12ac254d-f4bd-407d-ad46-509e9a33e2c1%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/5429BB50.7000005%40brainfood.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to