running a raw command?

Hi,
I'm running a raw command as in the document and I just get the
ansible usages options. I tried these various commands. Is there any
useful output to post here? I also tried command with a straight host
name.

sheepchase:library jmarcus$ ansible --version
ansible 0.6

ansible cl400 raw -a "yum install python-simplejson" -u jmarcus -K -f 1
ansible cl400 raw -a "yum install python-simplejson" -u jmarcus -K -f 1 -v
ansible CL400 raw -a "yum install python-simplejson" -u jmarcus -K -f 1 -v
ansible cl400 raw -a "yum install python-simplejson"

Thanks,
James

raw command should show output, I'll look into it later on tonight.

https://github.com/ansible/ansible/issues/775

The problem was you forgot the "-m" in front of the RAW module, so it
was running the default module, which is command. This gives me a
usage error on my development build, though it might not in older
ansible versions.

Anyway, try "-m raw"

Hi,
I was able to run: ansible CL400 -m raw -a "yum install
python-simplejson" -u jmarcus -K
I found the command without the -m on this page:
http://ansible.github.com/modules.html

The first time a ran it, it command hung and I'm not if it was a bad
password or something else:
Not sure if this output is helpful:

cl404.test.net | success | rc=0 >>

Sorry, try again.

[sudo via ansible, key=glktgjrppzslvvgkgskoclplmnsqnenn] password:

sudo: 1 incorrect password attempt

cl402.test.net | success | rc=0 >>

When I ran it again, it worked.

But I have another question per the documentation where I got the raw
command. It says:
ansible newhost.example.com raw -a "yum install python-simplejson"

So on another host I tried ansible IPAddr -m raw -a "yum install
python-simplejson" and it failed, is there a switch for just running
on one host?

Thanks,
James

If you feed things a bad sudo password the sudo code can hang.

Not really anything we can do about that.

Typo in docs needs to be fixed.

Hi,

But I have another question per the documentation where I got the raw
command. It says:
ansible newhost.example.com raw -a “yum install python-simplejson”

So on another host I tried ansible IPAddr -m raw -a “yum install
python-simplejson” and it failed, is there a switch for just running
on one host?

Failed is confusing. Failed how? What sort of message did you get?

It is likely that your hostname or IP isn’t in your inventory file.

Yes the host wasn't in the hosts file and it returned with that
message. I thought you might be able to run it without it being in
the hosts file.

sorry for not more adding more detail there.

Thanks,
James

Yes the host wasn't in the hosts file and it returned with that
message. I thought you might be able to run it without it being in
the hosts file.

You can.

Do -i "192.168.10.15," # the comma is very important even if you
specify only one host.

Need to work on the syntax of this, as it's a little weird, but hey, it's there.