If {{ip}} might be an Ansible group name, rather than a thing you can SSH
to, then you can't SSH to {{ip}}.

Backing up a step, what are you trying to do here? if you want to run a
command on a bunch of hosts, Ansible will already SSH to those hosts from
your control host to run the command, so you may just need

  shell: {{command}}

for your task.

And, if you just want to run a command that you specify on the command
line, you can use the ad-hoc 'ansible' command for that, rather than a
playbook, e.g.

  ansible group_domain -m shell -a 'netstat -an | grep 8080'

If you leave off the '-m shell' part, it uses the 'command' module by
default, so you can do stuff like

  ansible group_domain -a 'free -m'

if you don't have pipelines or other stuff that requires the 'shell' module.

                                      -Josh (j...@care.com)

(apologies for the automatic corporate disclaimer that follows)

This email is intended for the person(s) to whom it is addressed and may 
contain information that is PRIVILEGED or CONFIDENTIAL. Any unauthorized use, 
distribution, copying, or disclosure by any person other than the addressee(s) 
is strictly prohibited. If you have received this email in error, please notify 
the sender immediately by return email and delete the message and any 
attachments from your system.

-- 
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/22492.8329.899088.366315%40gargle.gargle.HOWL.
For more options, visit https://groups.google.com/d/optout.

Reply via email to