Create a machine credential and assign roles to teams that permit members of those teams to use that credential.
Outcomes
Create a machine credential.
Assign roles to the machine credential.
As the student user on the workstation machine, use the lab command to prepare your system for this exercise.
This command ensures that the automation controller is installed and configured with any necessary resources created in previous exercises.
[student@workstation ~]$ lab start host-credential
Procedure 3.2. Instructions
Navigate to https://controller.lab.example.com and log in as the admin user with redhat as the password.
Create a new credential called Operations.
Navigate to → .
Click to add a new credential.
On the next page, fill in the details as follows:
| Field | Value |
|---|---|
Operations
| |
Operations Credential
| |
devops
| |
redhat
| |
root
|
Because the devops user does not need to enter a password to run sudo commands, you do not need to enter a password in the field.
Leave the other fields untouched and click to create the new credential.
Assign the Operations team the Admin role on the Operations credential.
Navigate to → .
Click the credential and then click the tab.
Click to add access permissions.
Click , and then click .
Select the team and then click .
Select the role.
Click . This redirects you to the list of access permissions for the Operations credential, which now shows that all members of the Operations team, oliver and ophelia, are assigned the Admin role on the Operations credential.
Verify access of the Admin role to the Operations credential with the oliver user, who belongs to the Operations team.
Log out and log back in as oliver using redhat123 as the password. This user is assigned the Member role for the Operations team.
Navigate to → and then click the link for the credential that you created earlier.
Notice that the oliver user can modify the credential.
Assign the Developers team the Use role on the Operations credential.
Log out and log back in as the admin user with redhat as the password.
Navigate to → .
Click the credential and then click the tab.
Click to add access permissions.
Click and then click .
Select the team and then click .
Select the role.
Click . This redirects you to the list of access permissions for the Operations credential, which now shows that all members of the Developers team, daniel and david, are assigned the Use role on the Operations credential.
Verify the Use role for the Operations credential with the daniel user, who belongs to the Developers team.
Log out and log back in as daniel using redhat123 as the password. This user has an Admin role for the Developers team.
Navigate to → .
Click the credential and then click the tab. Notice that the daniel user cannot modify the credential even though he has an Admin role for the team.
Log out of the automation controller web UI.