Provisioning OpenStack with Ansible from scratch, missing modules?

Hey guys,

Currently, I’m developing an OpenStack Mitaka Ansible automation for Ubuntu 16.04.

I’m using a lot of “command / shell” Ansible modules and I would like to avoid it, and start using native Ansible OS modules.

However, I can’t find native modules for creating OpenStack Services, Projects, Users, Roles and Endpoints… Am I missing something?

This is how I am doing it today (looks ugly but it works for Mitaka b2):

https://github.com/tmartinx/svauto/blob/dev/ansible/roles/os_openstack_data/tasks/openstack-services.yml

https://github.com/tmartinx/svauto/blob/dev/ansible/roles/os_openstack_data/tasks/openstack-pur.yml

https://github.com/tmartinx/svauto/blob/dev/ansible/roles/os_openstack_data/tasks/openstack-endpoints.yml

I think that it would be super awesome to use native Ansible modules to do all of this, is it possible?

Thanks!
Thiago

Right, it is Friday night, looong week and I’m a bit tired… =P

I just found those modules:

https://docs.ansible.com/ansible/os_project_module.html

https://docs.ansible.com/ansible/os_user_module.html

That apparently, can help me to create initial Projects and Users, but, what about Services, Roles and Endpoints?

BTW, I’m using Ansible 2.0 from Ubuntu 16.04…

Cheers!
Thiago

I did this exact same thing a few months ago but using Kilo and Ubuntu 14.04LTS which may be of some use to you. However I did use some of the modules which have been replaced but should not be too hard to make those changes. Again just sharing this as it may be of some use for you.

https://github.com/mrlesmithjr/ansible-openstack

We are continually working on adding new modules. Some exist as PRs right now and will hopefully show up
in the Ansible 2.1 release.

-Dave

Thanks for sharing Larry! I’ll take a look at your automation… Cheers!

Sounds awesome David! I’m very interested in OpenStack Ansible native modules… Thanks!

Hey,

Have you considered using something like:
https://github.com/openstack/openstack-ansible

Here are the docs to the above repo: http://docs.openstack.org/developer/openstack-ansible/install-guide/index.html

Michael

Hello Michael,

Yes, I have considered OpenStack Ansible project, however, they are deploying OpenStack from Git and by using Python Pip directly (and many containers), no support for OpenvSwitch, neither DPDK, only Linux Bridges…

On the other hand, I am using native Ubuntu Xenial 16.04 Mitaka packages, because I prefer to keep it simple and also, I prefer to stick with 100% Ubuntu packages.

Also, I need OpenStack with OpenvSwitch powered by DPDK, which comes by default on Xenial, this is a must for my project.

So, unfortunately, OpenStack Ansible is not an option for me… =/

Best,
Thiago

Hello Michael,

Yes, I have considered OpenStack Ansible project, however, they are
deploying OpenStack from Git and by using Python Pip directly (and many
containers), no support for OpenvSwitch, neither DPDK, only Linux Bridges...

There's been some work in OpenStack-Ansible to add OpenVSwitch. I'm
going to hopefully continue this work to add the ability to use
OpenVSwitch with OpenStack-Ansible. That said certainly
OpenStack-Ansible is a fairly large framework.

On the other hand, I am using native Ubuntu Xenial 16.04 Mitaka packages,
because I prefer to keep it simple and also, I prefer to stick with 100%
Ubuntu packages.

Also, I need OpenStack with OpenvSwitch powered by DPDK, which comes by
default on Xenial, this is a must for my project.

I believe, and I just noticed this today, that the Ubuntu Cloud
Archive for Liberty contains a packaged OpenVSwitch with DPDK for
Ubuntu 14.04/Trusty.

Thanks,
Curtis.