The issue here was ssh keys werent setup on the server I was trying to run
the script on (the agent). ssh key exchange was setup between the agent and
the master, but because the agent itself didnt have ssh keys setup and
copied to itself the part of the script running the ad hoc command didnt
succeed. When i did that it ran properly..

Also I had to add an inventory file on the agent so that it would recognize
itself when the ad hoc command was run

Thanks for your responses

On Mon, Sep 11, 2017 at 10:04 AM, Gildas Cotomale <gildas.cotom...@gmail.com
> wrote:

> Go to the host and run the script to see what's really happening... :)
> I tryed from my box the following:
> > ansible 10.10.0.4 -m command -a 'echo Hello'
> And the result, with Ansible version 2.3.2.0 was:
> > [WARNING]: No hosts matched, nothing to do
> Just after that, I issue:
> > echo $?
> And guess what? The result is: 0
> I.e. there's no reel error on your call, but the module is not ran (i.e.
> the file is not created) because the host isn't in the inventory ;-)
> Again what are you trying to do and why are you mixing things so ?
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/ansible-project/wYPngKNucPc/unsubscribe.
> To unsubscribe from this group and all its topics, 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/3e3a2cb5-3699-407f-9552-a3e3ad4c0dfa%40googlegroups.
> com
> <https://groups.google.com/d/msgid/ansible-project/3e3a2cb5-3699-407f-9552-a3e3ad4c0dfa%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/CAL%3DL0unPTSbcXqy0P6wmP4VE58-vDm29Ozwhmw%3Dek_w4fQmLmA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to