shortcuts for OpenStack operations

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

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

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?

Common auth functions for things like ec2 live here - 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!