workshops

Training Course for Ansible Automation Platform

This project is maintained by ericzji

Exercise 2.5 - Role-based access control

Read this in other languages: uk English, japan 日本語.

You have already learned how Tower separates credentials from users. Another advantage of Ansible Tower is the user and group rights management.

Ansible Tower Users

There are three types of Tower Users:

Let’s create a user:

Ansible Tower Teams

A Team is a subdivision of an organization with associated users, projects, credentials, and permissions. Teams provide a means to implement role-based access control schemes and delegate responsibilities across organizations. For instance, permissions may be granted to a whole Team rather than each user on the Team.

Create a Team:

Now you can add a user to the Team:

Now click the PERMISSIONS button in the TEAMS view, you will be greeted with “No Permissions Have Been Granted”.

Permissions allow to read, modify, and administer projects, inventories, and other Tower elements. Permissions can be set for different resources.

Granting Permissions

To allow users or teams to actually do something, you have to set permissions. The user wweb should only be allowed to modify content of the assigned webservers.

Add the permission to use the template:

Test Permissions

Now log out of Tower’s web UI and in again as the wweb user.

Check the result: execute curl again on the control host to pull the content of the webserver on the IP address of node1 (you could of course check node2 and node3, too):

$ curl http://22.33.44.55

Just recall what you have just done: You enabled a restricted user to run an Ansible Playbook

Effectively you provided the power to execute automation to another user without handing out your credentials or giving the user the ability to change the automation code. And yet, at the same time the user can still modify things based on the surveys you created.

This capability is one of the main strengths of Ansible Tower!


Click here to return to the Ansible for Red Hat Enterprise Linux Workshop