Coding the playbooks and roles
Before we start, we should first reflect back to the beginning of this chapter. We outlined the steps to create users and projects within your OpenStack cloud. Here, they are again for a quick reference:
Creating the user (with a corresponding complex secure password)
Creating the project for the user
Linking that user to that project while assigning that user with the appropriate role
The first step to tackle is the user creation portion of the process. Creating the user is a simple task within OpenStack, so why not add some administration flare to go along with it. A part of the process of creating a user is assigning that user an appropriate password. We will include that as part of the role that creates the user and the project we will assign the user to.
When creating a playbook, I normally start with creating roles to handle the administrative tasks needed. The role will contain all the executable code against the OpenStack cloud. The playbook will contain...