thanks it worked
But also how can i use ansible without prompting me for a password
and also another issue with ansible i am getting this error when running
this adhoc command from the command line
kuwa@ubuntu:/etc/ansible$ ansible all -i hosts -u dokuwa1 --ask-pass -m yum
-a "name=httpd state=present" --become-user=root --ask-become-pass
SSH password:
SUDO password[defaults to SSH password]:
192.168.85.129 | FAILED! => {
"changed": false,
"failed": true,
"msg": "python2 bindings for rpm are needed for this module. python2
yum module is needed for this module"
On Sunday, May 28, 2017 at 6:31:54 PM UTC+1, Kai Stian Olstad wrote:
>
> On 24. mai 2017 23:08, Daley Okuwa wrote:
> > hello when i try to run this command
> > ansible all -i hosts -s --sudo -m ping
> >
> > I get this error message
> >
> > 192.168.85.129 | UNREACHABLE! => {
> > "changed": false,
> > "msg": "Failed to connect to the host via ssh: Permission denied
> > (publickey,password).\r\n",
> > "unreachable": true
> >
> > Please tell me what i am doing wrong
> > Normally i can ssh into this hosts 192.168.85.129
> > from the control server
>
> Are you using keys or password?
> If you are using password you are missing -k/--ask-pass option.
>
> --
> Kai Stian Olstad
>
--
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/dab0ce61-3dca-468e-998e-e85685565dcf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.