trouble with ec2 inventory script

This post might also help:

http://www.capsunlock.net/2012/10/using-ansible-for-ec2.html

Let us know how it goes.

Thanks for the replies! Right now I think I can get away with the single key use case as I’m not managing that many instances/security groups.

One more question- I’m having trouble running any commands/modules on a server (I get failed to transfer file). If it makes a difference using ssh instead of sftp- I have sftp, but maybe OSX is interfering with paramiko accessing it.

ansible prod-servers --user=ec2-user --private-key=key.pem -c ssh -m yum -a “pkg=acme state=installed”

and that command returns

www.myserver.com | FAILED => failed to transfer file to /home/ec2-user/.ansible/tmp/ansible-1353048600.42-120901038647992/yum:
Connecting to www.myserver.com
// MOTD //
subsystem request failed on channel 0
Connection closed

I looked briefly at adding a private key option into the hosts file as Michael suggested and it doesn’t seem like it would be too hard, so if I have some time I’ll do that.

Might be related to this issue: https://github.com/ansible/ansible/issues/1279
There's a newer option to use scp than sftp in current devel for ssh
transport.

-Rodney

Hmm, maybe. I tried doing this (parmiko, ssh and playbooks with both options) in OSX and LinuxMint and got problems. I posted a new message on this as you guys answered the main thrust of my initial question.