> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.itential.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server.

# Add new role

> How to add a new role to Ansible and synchronize it with Itential Gateway.

New roles must be added to Ansible first before they can be synchronized and viewed by Itential Gateway.

## Default location to add roles

The default location for custom content to add a role is `/usr/share/automation-gateway/ansible/roles`, or you can customize your own folder path and add it to the `Configuration/Ansible/Role Paths` array. Once you add a role to a folder that is in the "Role Paths" array and refresh the roles in Itential Gateway, it should appear.

![](</_fern-img/6cd2da224c86344fb806a42020cad3ba067c886c001b7f4d123898e80686533d.webp>)

## Refresh a new role

#### Navigate to API documentation

Navigate to API Documentation within the Automation Gateway UI.

#### Find the refresh endpoint

Find and expand `POST /roles/refresh`.

#### Try it out

Click **Try it out!**

#### Execute the refresh

Click **Execute** to refresh the cache and re-sync the roles with Ansible.

#### Verify the response

Verify the response. Response Code 200 indicates the refresh was successful.

#### View the new roles

Go back to the **Roles** section of Automation Gateway to view and use the new roles.

![](file:products/automation-gateway/versions/iag4/guide/media/17_AG_API_Post_Roles_2019-04-01\(1\).png)![](file:products/automation-gateway/versions/iag4/guide/media/18_AG_API_Post_Roles_Responses_2019-04-01\(1\).png)