elasticache module doesn't work

Hi,
I’ve tried to create an instance of elasticache, and when I’ve executed the script ansible has returned this

failed: [localhost] => {“failed”: true}
msg: Use of cache security groups is not permitted in this API version for your account.
FATAL: all hosts have already failed – aborting

The last script that I’ve executed is

  • name: Create ElastiCache
    elasticache:
    name: “test-please-delete”
    state: present
    engine: memcached
    cache_engine_version: 1.4.14
    node_type: cache.m1.small
    num_nodes: 1
    cache_port: 11211

cache_security_groups: cicciopasticcio

security_group_ids: [“{{sg_memcached}}”]
region: eu-west-1

I’ve tried several combination of this script (also the example of ansible documentation).
I’ve the ansible 1.9.1 and run on Mac OSX.

Thank you

This does not seem to be a code issue, you are trying to use a feature that is not available to the AWS account you are using.

Using the same credentials with “cache_subnet_group” and a branch of “ansible 2.0” everithing work fine.

This mean that it’s a code issue and not from our AWS account.

do you have some more infos to solve the problem with the actual stable version (1.9.1) ?

only info I had was the error message:

msg: Use of cache security groups is not permitted in this API version for your account.
FATAL: all hosts have already failed – aborting

but that seems to be wrong from what you are saying, probably a bug in the module that has since then been fixed, I’ll look at the history later to confirm

Thank you so much, I’ll attend which confirm.

i think this commit 64a2077787904f144f77839660071f35f25d181f fixes your issue, where the code is changed to connect to the exact region for the vpc connection. earlier the vpc connection woudl be to region where your account might not have rights to vpc’s
for now i think you can create a directory “library” in the same level as your playbook and place the latest module code there https://github.com/ansible/ansible-modules-core/blob/devel/cloud/amazon/elasticache.py and that should fix you up till 2.0 is released.

Great! It works! Thank you so much for the support :slight_smile:

A last question, when will the new version come out?

Thanks!