On 28. sep. 2016 20:41, Christopher Stobie wrote:
That's what I thought but I get an error when trying to pass it to an ebs
volume attachment.
- name: Create and attach ec2 volume
ec2_vol:
instance: "{{ item.instance_ids }}"
I have no knowledge about ec2_vol but can instance: be a list?
volume_size: "{{ volume_size }}"
volume_type: "{{ volume_type }}"
device_name: "/dev/xvd{{ drive }}"
region: us-west-2
with_items: "{{ ec2a.results }}"
when: ebs is defined
<snip>
u'group_id': None, u'validate_certs': True}}}) => {
"item": {
"changed": true,
"instance_ids": [
"i-3a0e8822"
],
Here you see that item.instance_ids is a list.
<snip>
"tagged_instances": []}, "msg": "Invalid id: \"['i-3a0e8822']\""}
Tells me invalid ID. I have wait set to wait for the instance to be
running.
I guess instance: can't be a list, if so you can get the first item in
the list by using item.instance[0].
--
Kai Stian Olstad
--
You received this message because you are subscribed to the Google Groups "Ansible
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/33a09914-8ea5-5be0-a573-70a6dbba14a1%40olstad.com.
For more options, visit https://groups.google.com/d/optout.