When I decorate a task with @ec2instance, it prompts me for a password for the current local user of my local host (instead of using the awsfab-ssh-user user and the default SSH key). I conducted a little test to compare the behaviour of a task decorated with @ec2instance(tags=...) started without --ec2tags and a similar task, not decorated with @ec2instance, but started with --ec2tags=...:
# fabfile.py
from fabric.api import task, run
from awsfabrictasks.decorators import ec2instance
@task
@ec2instance(tags={'Environment':'benchmark'})
def whoami_decorated():
run('whoami')
@task
def whoami_not_decorated():
run('whoami')
I would expect awsfab whoami_decorated and awsfab --ec2tags=Environment=benchmark whoami_not_decorated to produce the same results. Alas, awsfab whoami_decorated fails:
Why doesn't whoami_decorated use my SSH key and the awsfab-ssh-user (set to root)?
Why do the two calls give different results?
[This is about @ec2instance just like issue #15, but it is concerned with how it works, not when it is executed, so I decided to open a new issue for it.]
When I decorate a task with
@ec2instance
, it prompts me for a password for the current local user of my local host (instead of using theawsfab-ssh-user
user and the default SSH key). I conducted a little test to compare the behaviour of a task decorated with@ec2instance(tags=...)
started without--ec2tags
and a similar task, not decorated with@ec2instance
, but started with--ec2tags=...
:I would expect
awsfab whoami_decorated
andawsfab --ec2tags=Environment=benchmark whoami_not_decorated
to produce the same results. Alas,awsfab whoami_decorated
fails:but
awsfab --ec2tags=Environment=benchmark whoami_not_decorated
succeeds:Now I'm wondering
whoami_decorated
use my SSH key and theawsfab-ssh-user
(set toroot
)?[This is about
@ec2instance
just like issue #15, but it is concerned with how it works, not when it is executed, so I decided to open a new issue for it.]