Is there a reason you're not using the yum module?

On Thursday, September 15, 2016 at 9:51:24 AM UTC-7, Mike Michel wrote:
> Hi,
> i am having trouble to execute a command which needs sudo on the remote 
> host. when i execute it directly on the host with sudo there is no ask for 
> password but when using ansible it fails with "sudo: a password is required
> i don't have root rights on the remote and i am using a jumphost. i tried 
> all the "become" vodoo but no luck yet.
> ---
> - hosts: loadbalancer
>   vars:
>     ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q john@IP"'
>   tasks:
>   - command: yum install htop
> ansible-playbook -vvvvvvvvvvv play.yml -l a-host  -i hosts.yml -u john -b
> "module_stdout": "sudo: a password is required\r\n", "msg": "MODULE 
> FAILURE", "parsed": false}
> When i am directly on the target host as user john "sudo yum install htop" 
> works without asking for a password so i guess NOPASSWD is set for john. I 
> don't even have a password. I connect via ssh key.
> Any ideas?

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 post to this group, send email to
To view this discussion on the web visit
For more options, visit

Reply via email to