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 [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/8d0df606-3d19-4037-8d2c-8533f3f5e9c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.