Deleting roles

Removing roles from the OpenStack Identity is a simple one step. In this example, we will show how to delete a role named oldrole.

Getting ready

Ensure that you are logged on to a correctly configured OpenStack client and can access the OpenStack environment as a user with admin privileges.

Refer to Chapter 2, The OpenStack Client, for details of setting up your environment to use OpenStack command-line client.

How to do it…

In order to delete a role, execute the following commands:

  1. Get the role's name from a current role list:
    openstack role list
    
    How to do it…
  2. Delete the oldrole role:
    openstack role delete oldrole
    

    This command will have no output.

Get OpenStack Cloud Computing Cookbook - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.