# ec2\_lc issue - only one volume is being created??

**URL:** <https://forum.ansible.com/t/ec2-lc-issue-only-one-volume-is-being-created/25928>\
**Category:** Ansible Project\
**Created:** [November 5, 2017, 11:40am UTC](https://forum.ansible.com/t/ec2-lc-issue-only-one-volume-is-being-created/25928 "2017-11-05T11:40:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Onallion](https://avatars.discourse-cdn.com/v4/letter/o/9e8a1a/32.png) [@Onallion](https://forum.ansible.com/u/Onallion)\
**Post date:** [November 5, 2017, 11:40am UTC](https://forum.ansible.com/t/ec2-lc-issue-only-one-volume-is-being-created/25928/1 "2017-11-05T11:40:48Z")

</div>

Hi guys,

Ansible 2.4  
I am attempting to use the ec2\_lc module to create a launch configuration.  
All is working great except for the volumes, only one volume (out of 2) is being created, and for some reason it is also created without a “type”.

My code:

`

volumes:

- device\_name: “{{ LC\_internal\_volume1\_device\_name }}”  
volume\_size: “{{ LC\_internal\_volume1\_size }}”  
device\_type: “{{ LC\_internal\_volume1\_device\_type }}”  
delete\_on\_termination: “{{ LC\_internal\_volume1\_delete\_on\_termination }}”  
encrypted: “{{ LC\_internal\_volume1\_encrypted }}”
- device\_name: “{{ LC\_internal\_volume2\_device\_name }}”  
volume\_size: “{{ LC\_internal\_volume2\_size }}”  
device\_type: “{{ LC\_internal\_volume2\_device\_type }}”  
delete\_on\_termination: “{{ LC\_internal\_volume2\_delete\_on\_termination }}”  
encrypted: “{{ LC\_internal\_volume2\_encrypted }}”

`

And the variables:

`

# Volume 1

LC\_internal\_volume1\_device\_name: “/dev/xvda”  
LC\_internal\_volume1\_size: 50  
LC\_internal\_volume1\_device\_type: “gp2”  
LC\_internal\_volume1\_delete\_on\_termination: true  
LC\_internal\_volume1\_encrypted: false

# Volume 2

LC\_internal\_volume2\_device\_name: “/dev/xvdcz”  
LC\_internal\_volume2\_size: 100  
LC\_internal\_volume2\_device\_type: “gp2”  
LC\_internal\_volume2\_delete\_on\_termination: true  
LC\_internal\_volume2\_encrypted: false

`

Only the second volume (/dev/xvdcz) is created, and its “type” field is empty.

This is what I’m seeing when running the playbook with -vvv:

`

“validate\_certs”: true,  
“volumes”: [  
{  
“delete\_on\_termination”: true,  
“device\_name”: “/dev/xvda”,  
“device\_type”: “gp2”,  
“encrypted”: false,  
“volume\_size”: 50  
},  
{  
“delete\_on\_termination”: true,  
“device\_name”: “/dev/xvdcz”,  
“device\_type”: “gp2”,  
“encrypted”: false,  
“volume\_size”: 100  
}  
],  
“vpc\_id”: null  
}  
},  
“name”: “MyLC”,  
“result”: {  
“block\_device\_mappings”: [  
{  
“device\_name”: “/dev/xvdcz”,  
“ebs”: {  
“snapshot\_id”: null,  
“volume\_size”: 100  
},  
“virtual\_name”: null  
}

`

Any help appreciated.

Thanks
