> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.itential.com/itential-gateway/4/ansible-add-new-role/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. ![]() ## 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) > How to add a new role to Ansible and synchronize it with Itential Gateway.