# os\_security\_group\_rule by project

**URL:** <https://forum.ansible.com/t/os-security-group-rule-by-project/23193>\
**Category:** Ansible Project\
**Created:** [December 7, 2016, 7:14pm UTC](https://forum.ansible.com/t/os-security-group-rule-by-project/23193 "2016-12-07T19:14:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_King](https://avatars.discourse-cdn.com/v4/letter/t/cdc98d/32.png) [@Thomas\_King](https://forum.ansible.com/u/Thomas_King)\
**Post date:** [December 7, 2016, 7:14pm UTC](https://forum.ansible.com/t/os-security-group-rule-by-project/23193/1 "2016-12-07T19:14:21Z")

</div>

I am building an Ansible playbook to create a new project, add a user role, work with security groups, and other new-project tasks. The playbook creates a project after asking for some input and would need to continue working on that project through the remaining tasks.

The os\_security\_group\_rule module documentation states the project name or ID should either be in the auth dictionary or in the cloud file. The cloud file isn’t feasible unless I wrap the entire playbook in a Python script.

This may be due to my own ignorance about Ansible - is there a better way to add the project name or project ID to the playbook, such as ‘project\_name: {{ variable }}’ ? Or is this module not coded to pass this information in as an option?

The module documentation has no such option directly.

If there is no such option, can I add the project\_name to auth: without the other dictionary objects since I use a cloud file?

---

<div class="post-metadata">

**Author:** ![Thomas\_King](https://avatars.discourse-cdn.com/v4/letter/t/cdc98d/32.png) [@Thomas\_King](https://forum.ansible.com/u/Thomas_King)\
**Post date:** [December 15, 2016, 9:54pm UTC](https://forum.ansible.com/t/os-security-group-rule-by-project/23193/2 "2016-12-15T21:54:01Z")

</div>

Figured it out:  
auth:  
project\_name: “{{ projname }}”
