passing aws_secret_key and aws_access_key as parameters in playbook task fails

Hi,

I have a playbook which spins/deletes servers, adds volumes to previously created instances etc. I have exported my aws_access_key and aws_secret_key as environment variables. But when I try to pass them via parameters in playbook as names aws_access_key and aws_secret_key(as stated in ec2 module), my program fails stating unsupported parameters for aws_secret_key. My code is -

tasks:

  • name: Launch Instances
    local_action: ec2 aws_access_key=xxxx aws_secret_key=xxxx keypair={{keypair}} group={{security_group}} instance_type={{instance_type}} image={{image}} wait=true count={{count}} region={{region}} instance_tags=‘{“Name”:“NewansibleTest021”}’
    register: ec2

But when I use ec2_access_key and ec2_secret_key instead of aws_access_key and aws_secret_key, my program runs successfully. So I would like to know whether this is a bug or am I doing somethin wrong…? My final code is -

tasks:

  • name: Launch Instances
    local_action: ec2 ec2_access_key=xxxx ec2_secret_key=xxxx keypair={{keypair}} group={{security_group}} instance_type={{instance_type}} image={{image}} wait=true count={{count}} region={{region}} instance_tags=‘{“Name”:“NewansibleTest021”}’
    register: ec2

Thanks,

Those parameters were renamed recently and the documents reflect their names as of 1.3. If you’re still using 1.2.x you should stick with the ec2_* names or upgrade to 1.3 (which was released last Friday).

We did add aliases though, so old names are still good :slight_smile:

Yep, the old names are still valid for 1.3+ for backwards-compatibility.

Yup it works…Thanks for the help…