# elasticache subnet group

**URL:** <https://forum.ansible.com/t/elasticache-subnet-group/21649>\
**Category:** Ansible Project\
**Created:** [June 2, 2016, 6:01pm UTC](https://forum.ansible.com/t/elasticache-subnet-group/21649 "2016-06-02T18:01:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eric\_S1](https://avatars.discourse-cdn.com/v4/letter/e/c77e96/32.png) [@Eric\_S1](https://forum.ansible.com/u/Eric_S1)\
**Post date:** [June 2, 2016, 6:01pm UTC](https://forum.ansible.com/t/elasticache-subnet-group/21649/1 "2016-06-02T18:01:17Z")

</div>

using the elasticache\_subnet\_group module and trying to populate the list of subnet ids using a variable but its only populating one of the ids. Here’s the task:

- name: create elasticache subnet group  
elasticache\_subnet\_group:  
state: present  
name: “{{ Env }}-{{ nameCache }}”  
description: “{{ Env }}-{{ nameCache }}”  
subnets: “{{ item }}”  
region: “{{ aws\_reg }}”  
with\_items: “{{ subgrpids }}”

and the var is:  
subgrpids:

- 
- 

But if I list the ids in the task it works properly.

---

<div class="post-metadata">

**Author:** ![Eric\_S1](https://avatars.discourse-cdn.com/v4/letter/e/c77e96/32.png) [@Eric\_S1](https://forum.ansible.com/u/Eric_S1)\
**Post date:** [June 2, 2016, 6:36pm UTC](https://forum.ansible.com/t/elasticache-subnet-group/21649/2 "2016-06-02T18:36:35Z")

</div>

using ansible 2.1
