In this section, we will create a playbook and role that will set up a tenant to use the enabled multi-tenant isolation functionality within your OpenStack cloud. To leverage this task, you must have completed the pre-configuration steps outlined in the preceding section. We will not cover these steps in the role being created next. However, we will take the steps outlined two sections earlier, automate them so that you only need to supply a few variable values, and then execute only one command.
Before getting started, here is another brief outline of the tasks we will have to do:
Create a new tenant.
Create new host aggregate.
Add hosts to new host aggregate.
Update host aggregate metadata.
Create custom flavor to include tenant filter.
Apply volume type quotas (optional).
In this case we will focus solely on creating a role, we can start with the main.yml
file within the role directory named tenant-isolation/tasks
. The initial contents of this file will look similar...