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: https://docs.ansible.com/ansible/latest/modules/ec2_vol_module.html#parameter-instance On Fri, 7 Feb 2020 at 04:55, Sandy Hung <[email protected]> wrote: > so I need use module in add volume? > > On Friday, February 7, 2020 at 11:26:11 AM UTC+8, Sandy Hung wrote: >> >> 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 >> >> -- > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/889f8f1a-dff7-4477-ad54-879b6defc7ec%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/889f8f1a-dff7-4477-ad54-879b6defc7ec%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Sent from a mobile device - please excuse the brevity, spelling and punctuation. -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAL8fbwMUZZeSC1wYHvmTtbrOrz0ajk0_Tan_%2BCVOHa84hDzk_g%40mail.gmail.com.
