# Noob issue: How to use profiles with ansible ec2.py

**URL:** <https://forum.ansible.com/t/noob-issue-how-to-use-profiles-with-ansible-ec2-py/22838>\
**Category:** Ansible Developer\
**Created:** [October 20, 2016, 2:56am UTC](https://forum.ansible.com/t/noob-issue-how-to-use-profiles-with-ansible-ec2-py/22838 "2016-10-20T02:56:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sonny\_Chee](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@Sonny\_Chee](https://forum.ansible.com/u/Sonny_Chee)\
**Post date:** [October 20, 2016, 2:56am UTC](https://forum.ansible.com/t/noob-issue-how-to-use-profiles-with-ansible-ec2-py/22838/1 "2016-10-20T02:56:26Z")

</div>

Hey Guys,

When I do the following:

ansible -i ./ec2.py --profile my\_profile\_name tag\_Name\_nar -m ping

I get the error message:

Usage: ansible [options]

ansible: error: no such option: --profile

How can I pass the “–profile my\_profile\_name” argument to ec2.py rather than have it interpreted by ansible?

Any pointers would be appreciated.

---

<div class="post-metadata">

**Author:** ![Sonny\_Chee](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@Sonny\_Chee](https://forum.ansible.com/u/Sonny_Chee)\
**Post date:** [October 20, 2016, 3:50am UTC](https://forum.ansible.com/t/noob-issue-how-to-use-profiles-with-ansible-ec2-py/22838/2 "2016-10-20T03:50:53Z")

</div>

Found the answer in the docs…
