aws ec2 add new ebs volume error

61 views
Skip to first unread message

Sandy Hung

unread,
Feb 6, 2020, 10:26:11 PM2/6/20
to Ansible Project
Dear all:

please help me thanks.  

- name: Create New EBS volume
     ec2_vol:
       aws_access_key: "{{ aws_access_key }}"
       aws_secret_key: "{{ aws_secret_key }}"
       instance_id: "{{ instance_id }}"
       volume_size: "{{ volume_size }}"
       device_name: "{{ device_name}}"
       region: "{{ region }}"
       volume_type: "{{ volume_type }}"
     register: ec2_vol


[WARNING]: Found variable using reserved name: name


PLAY [localhost] ************************************************************************

TASK [Create Snapshot EC2] **************************************************************
changed: [localhost]

TASK [Create New EBS volume] ************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (ec2_vol) module: instance_id Supported parameters include: aws_access_key, aws_secret_key, debug_botocore_endpoint_logs, delete_on_termination, device_name, ec2_url, encrypted, id, instance, iops, kms_key_id, name, profile, region, security_token, snapshot, state, tags, validate_certs, volume_size, volume_type, zone"}

PLAY RECAP ******************************************************************************
localhost                  : ok=1    changed=1    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

Work-Hard

unread,
Feb 6, 2020, 10:35:27 PM2/6/20
to Ansible Project
(ec2_vol) the module is not supported by anisble

Sandy Hung

unread,
Feb 6, 2020, 10:55:27 PM2/6/20
to Ansible Project
so I need use module in add volume?

Dick Visser

unread,
Feb 7, 2020, 12:41:21 AM2/7/20
to ansible...@googlegroups.com
Just read the error message. It literally says what’s not right:

Unsupported parameters for (ec2_vol) module: instance_id 

I’ve never used the module but from the docs you can see that this is the parameter you need to use:


--
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-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/889f8f1a-dff7-4477-ad54-879b6defc7ec%40googlegroups.com.
--
Sent from a mobile device - please excuse the brevity, spelling and punctuation.
Reply all
Reply to author
Forward
0 new messages