# aws\_ec2 and compose option

**URL:** <https://forum.ansible.com/t/aws-ec2-and-compose-option/31808>\
**Category:** Ansible Project\
**Created:** [December 11, 2019, 11:05pm UTC](https://forum.ansible.com/t/aws-ec2-and-compose-option/31808 "2019-12-11T23:05:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guy\_Knights1](https://avatars.discourse-cdn.com/v4/letter/g/82dd89/32.png) [@Guy\_Knights1](https://forum.ansible.com/u/Guy_Knights1)\
**Post date:** [December 11, 2019, 11:05pm UTC](https://forum.ansible.com/t/aws-ec2-and-compose-option/31808/1 "2019-12-11T23:05:46Z")

</div>

Hi,

According to the documentation for the aws\_ec2 plugin, the compose option can be used to create vars when the plugin is executed.

I’ve been trying to get this to work with a simple plugin config like so:

plugin: aws\_ec2  
regions:

- us-east-1  
filters:  
tag:Environment: prod  
instance-state-name: running  
hostnames:
- private-ip-address  
compose:  
site: ‘testing’  
strict\_permissions: False  
strict: False

However, when I run a playbook and supply the above inventory file, the ‘site’ var is undefined.

Am I using this option correctly?

Thanks,  
Guy

---

<div class="post-metadata">

**Author:** ![Guy\_Knights](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@Guy\_Knights](https://forum.ansible.com/u/Guy_Knights)\
**Post date:** [December 14, 2019, 12:21am UTC](https://forum.ansible.com/t/aws-ec2-and-compose-option/31808/2 "2019-12-14T00:21:19Z")

</div>

Does anyone have any suggestions about this?
