Let's jump right into examining the role we created, called tenant-isolation
. The completed role and file named main.yml
located in the tenant-isolation/tasks
directory looks similar to this:
--- - name: Create new tenant command: keystone --os-username={{ OS_USERNAME }} --os-password={{ OS_PASSWORD }} --os-tenant-name={{ OS_TENANT_NAME }} --os-auth-url={{ OS_AUTH_URL }} tenant-create --name={{ tenant_name }} --description="{{ tenant_desc }}" - name: Get new tenant ID shell: keystone --os-username={{ OS_USERNAME }} --os-password={{ OS_PASSWORD }} --os-tenant-name={{ OS_TENANT_NAME }} --os-auth-url={{ OS_AUTH_URL }} tenant-list | awk '/ {{ tenant_name }} / {print $2}' register: tent1 - name: Create new host aggregate command: nova --os-username={{ OS_USERNAME }} --os-password={{ OS_PASSWORD }} --os-tenant-name={{ OS_TENANT_NAME }} --os-auth-url={{ OS_AUTH_URL }} aggregate-create {{ agg_name }} - name: Get new aggregate ID shell: nova --os-username={{ OS_USERNAME...