Hello,

Yes, I have a clue: check your sudo configuration.
Very likely your sudo is set up in a way it is requiring an TTY for
command executions. When Ansible sends a command it uses ssh, which usually
does not provide a TTY.

Alex

On Thu, Feb 10, 2022 at 12:31 PM Tony Wong <tdubb...@gmail.com> wrote:

> I am trying to run remote commands on few servers
>
> ansible -a "df -h" myservers -i hosts -u "user" --assk-pass
>
> this works
>
> but when i do
>
> ansible -a "sudo systemctl status docker" -i hosts -u "user --ask-pass
>
> then i enter my password
>
> it just hangs
>
> any idea?
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/c588d43d-40b6-4ba6-9ca7-027bdfe8e95bn%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/c588d43d-40b6-4ba6-9ca7-027bdfe8e95bn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 



[image: Edmonton_sig_RGB_S.jpg]

Alex Wanderley

Application and Infrastructure Analyst II
Acting Team Lead Storage and Backup Solutions

Financial and Corporate Services | Open City and Technology



780-496-4156  Office

780-819-0273  Mobile



City of Edmonton

Century Place, 12th Floor

9803 102A Avenue NW

Edmonton AB, T5J 3A3



All information contained in this email post is proprietary to the City of
Edmonton, confidential and intended only for the addressed recipient. If
you have received this post in error, please disregard the contents, inform
the sender of the misdirection, and remove it from your system. The
copying, dissemination or distribution of this email, if misdirected, is
strictly prohibited.

-- 
*The contents of this message and any attachment(s) are confidential, 
proprietary to the City of Edmonton, and are intended only for the 
addressed recipient. If you have received this in error, please disregard 
the contents, inform the sender of the misdirection, and remove it from 
your system. The copying, dissemination, or distribution of this message, 
if misdirected, is strictly prohibited.*

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CADp8UUS6qVKeE8eW%2BBy22bB80iMHfF8H6zXcbJD7CM1ht%2Bjm%3DA%40mail.gmail.com.

Reply via email to