Dear all:

I have some problem I don't know I attach ebs from snapshot but attach show 
error message please help thanks.

fatal: [localhost]: FAILED! => {
    "msg": "The task includes an option with an undefined variable. The 
error was: list object has no element 0\n\nThe error appears to be in 
'/home/sandy/aws/create-EBS.yml': line 74, column 6, but may\nbe elsewhere 
in the file depending on the exact syntax problem.\n\nThe offending line 
appears to be:\n\n\n   - name: attach ebs volume from snapshot\n     ^ 
here\n"

 - name: Get snapshot info
     ec2_snapshot_info:
       aws_access_key: "{{aws_access_key}}"
       aws_secret_key: "{{aws_secret_key}}"
       region: "{{ region }}"
       filters:
        "tag:Name": snapshot
     register: ec2_snapshot_facts


"this error


- name: attach ebs volume from snapshot
     ec2_vol:
       aws_access_key: "{{ aws_access_key }}"
       aws_secret_key: "{{ aws_secret_key }}"
       region: "{{ region }}"
       zone: "{{zone}}"
       instance: "{{ instance_id }}"
       device_name: "{{ device_name }}"
       snapshot_ids: '{{ec2_snapshot_facts.snapshots[0].snapshot_id}}'
       with_items: "{{instance_id}}"

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/49bb7bb8-294c-48f0-bc8c-151f60afcc66%40googlegroups.com.

Reply via email to