# Can't provide parameters to Ansible ec2 inventory plugin

**URL:** <https://forum.ansible.com/t/cant-provide-parameters-to-ansible-ec2-inventory-plugin/31705>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [November 21, 2019, 10:16pm UTC](https://forum.ansible.com/t/cant-provide-parameters-to-ansible-ec2-inventory-plugin/31705 "2019-11-21T22:16:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Viktor\_Maksymenko](https://avatars.discourse-cdn.com/v4/letter/v/bc8723/32.png) [@Viktor\_Maksymenko](https://forum.ansible.com/u/Viktor_Maksymenko)\
**Post date:** [November 21, 2019, 10:16pm UTC](https://forum.ansible.com/t/cant-provide-parameters-to-ansible-ec2-inventory-plugin/31705/1 "2019-11-21T22:16:07Z")

</div>

I’m using ec2 inventory plugin and interested in the ability to provide parameters to it like this:

`  
plugin: aws\_ec2  
regions:

- “{{ region}}”  
filters:  
tag:Usage: “{{ usage }}”  
`

But extra-args, that I provide on playbook execution, does not come to inventory. For this command

`  
ansible-playbook -i inventories/aws/aws\_ec2.yml --extra-vars “usage=automation region=us-east-1” ifconfig.playbook.yml

`

I got  
`  
[WARNING]: \* Failed to parse …/aws\_ec2.yml with auto plugin: Invalid endpoint: [https://ec2](https://ec2).{{ region }}.amazonaws.com

`

Is it possible to make inventory parametrised?

Thanks
