ec2_lc issue - only one volume is being created??

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