# shortcuts for OpenStack operations

**URL:** <https://forum.ansible.com/t/shortcuts-for-openstack-operations/15752>\
**Category:** Ansible Project\
**Created:** [July 24, 2014, 12:40am UTC](https://forum.ansible.com/t/shortcuts-for-openstack-operations/15752 "2014-07-24T00:40:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dimon](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@Dimon](https://forum.ansible.com/u/Dimon)\
**Post date:** [July 24, 2014, 12:40am UTC](https://forum.ansible.com/t/shortcuts-for-openstack-operations/15752/1 "2014-07-24T00:40:02Z")

</div>

I have finally gottent my first OpenStack “node creation” playbook which in fact turned out rather nice, once I looked at source code 😉

I have found out that names used in OpenStack component creation routines from ansible will be considered “unique” and ansible will happily provide me with needed “id” for the component (like tenant\_id, image\_id, etc.), see [https://github.com/droopy4096/openstack-ng/blob/multinode/sample.yml](https://github.com/droopy4096/openstack-ng/blob/multinode/sample.yml)

however I found it rather unpleasant to repeat all of the authentication tokens with every OpenStack call. Looking at source code it doesn’t seem like it’s possible to bypass this “feature” by setting up ENV vars according to OpenStack tradition.

Question: what could be done to optimize such a playbook? Or, conversely: what am I missing?

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [July 24, 2014, 11:02am UTC](https://forum.ansible.com/t/shortcuts-for-openstack-operations/15752/2 "2014-07-24T11:02:56Z")

</div>

Common auth functions for things like ec2 live here - [https://github.com/ansible/ansible/tree/devel/lib/ansible/module\_utils](https://github.com/ansible/ansible/tree/devel/lib/ansible/module_utils)

OpenStack really needs stubs here for common auth, and then it can take variables like EC2/RAX/GCE and others.

This would also make sure all that happens in one place.

Contributions would be welcome! Stop by ansible-devel list if you’d like to discuss!
