> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/infrastructure-as-code-management/iacm-api-reference/ansible/update-ansible-remote-inventory-git-source.md).

# Update Ansible remote inventory git source

Update the git source of an existing remote inventory.

```json
{"openapi":"3.0.3","info":{"title":"Infrastructure as Code Management","version":"0.1.0"},"tags":[{"name":"ansible","description":"Ansible Service handles the API for ansible entities."}],"servers":[{"url":"http://localhost:80"}],"paths":{"/api/orgs/{org}/projects/{project}/ansible/inventory/{identifier}/remote":{"put":{"tags":["ansible"],"summary":"Update Ansible remote inventory git source","description":"Update the git source of an existing remote inventory.","operationId":"ansible#update-inventory-remote","parameters":[{"name":"org","in":"path","description":"Org is the organisation identifier.","required":true,"schema":{"type":"string","description":"Org is the organisation identifier.","minLength":1,"maxLength":128}},{"name":"project","in":"path","description":"Project is the project identifier.","required":true,"schema":{"type":"string","description":"Project is the project identifier.","minLength":1,"maxLength":128}},{"name":"identifier","in":"path","description":"Inventory identifier","required":true,"schema":{"type":"string","description":"Inventory identifier"}},{"name":"Harness-Account","in":"header","description":"Account is the internal customer account ID.","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Account is the internal customer account ID.","minLength":1,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInventoryRemoteRequest"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInventoryRemoteResponse"}}}},"400":{"description":"BadRequestError: Bad Request response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/AnsiblePolicyViolationError"}}}},"401":{"description":"UnauthorizedError: Unauthorized response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/AnsibleError"}}}},"403":{"description":"ForbiddenError: Forbidden response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/AnsibleError"}}}},"404":{"description":"NotFoundError: Not Found response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/AnsibleError"}}}},"408":{"description":"TimeoutError: Request Timeout response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/AnsibleError"}}}},"409":{"description":"ConflictError: Conflict response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/AnsibleError"}}}},"423":{"description":"LockedError: Locked response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/AnsibleError"}}}},"499":{"description":"ContextCancelledError:  response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/AnsibleError"}}}},"500":{"description":"InternalServerError: Internal Server Error response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/AnsibleError"}}}},"502":{"description":"BadGatewayError: Bad Gateway response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/AnsibleError"}}}}}}}},"components":{"schemas":{"UpdateInventoryRemoteRequest":{"type":"object","properties":{"remote_source":{"$ref":"#/components/schemas/RemoteSource"}},"required":["remote_source"]},"RemoteSource":{"type":"object","properties":{"repository":{"type":"string","description":"Git repository name/identifier."},"repository_branch":{"type":"string","description":"Git branch (optional; mutually exclusive with repository_commit)."},"repository_commit":{"type":"string","description":"Git commit or tag (optional; mutually exclusive with repository_branch)."},"repository_connector":{"type":"string","description":"Harness connector reference used to fetch repository content. Omit for Harness Code repositories."},"repository_path":{"type":"string","description":"Path within the repo to the inventory file or directory."}},"description":"remote_source is the git location a remote inventory's hosts, groups and group_vars are read from.","required":["repository","repository_path"]},"UpdateInventoryRemoteResponse":{"type":"object","properties":{"policy_evaluation":{"$ref":"#/components/schemas/AnsibleEvaluation"}}},"AnsibleEvaluation":{"type":"object","properties":{"account_id":{"type":"string","description":"The Harness account in which the evaluation was performed"},"action":{"type":"string","description":"The action that triggered evaluation"},"created":{"type":"integer","description":"The time at which the evaluation was performed in Unix time milliseconds","format":"int64"},"details":{"type":"array","items":{"$ref":"#/components/schemas/AnsibleEvaluationDetail"},"description":"The detailed results of te evaluation"},"entity":{"type":"string","description":"An arbitrary user-supplied string that globally identifies the entity under evaluation"},"entity_metadata":{"type":"string","description":"Additional arbitrary user-supplied metadata about the entity under evaluation"},"id":{"type":"integer","description":"The ID of this evaluation","format":"int64"},"input":{"description":"The input provided at evaluation time"},"org_id":{"type":"string","description":"The Harness organisation in which the evaluation was performed"},"project_id":{"type":"string","description":"The Harness project in which the evaluation was performed"},"status":{"type":"string","description":"The overall status of the evaluation indicating whether it passed","enum":["error","warning","pass"]},"type":{"type":"string","description":"The types of the entity under evaluation"}},"description":"The result of a single evaluation","required":["id","status","entity","entity_metadata","type","action","account_id","org_id","project_id","created","input","details"]},"AnsibleEvaluationDetail":{"type":"object","properties":{"account_id":{"type":"string","description":"Harness account ID associated with this policy set","default":""},"action":{"type":"string","description":"Action that triggers the policy set","minLength":1},"created":{"type":"integer","description":"Time the policy set was created","format":"int64"},"description":{"type":"string","description":"Description of the policy set"},"details":{"type":"array","items":{"$ref":"#/components/schemas/AnsibleEvaluatedPolicy"}},"enabled":{"type":"boolean","description":"Only enabled policy sets are evaluated when evaluating by type/action"},"identifier":{"type":"string","description":"Identifier of the policy set","minLength":1},"name":{"type":"string","description":"Name of the policy set","minLength":1},"org_id":{"type":"string","description":"Harness organization ID associated with this policy set","default":""},"project_id":{"type":"string","description":"Harness project ID associated with this policy set","default":""},"status":{"type":"string","description":"The overall status for this policy set indicating whether it passed","enum":["error","warning","pass"]},"type":{"type":"string","description":"Type of input suitable for the policy set","minLength":1},"updated":{"type":"integer","description":"Time the policy set was last updated","format":"int64"}},"required":["status","details","identifier","name","action","type","enabled","created","updated","account_id","org_id","project_id","entity_selector"]},"AnsibleEvaluatedPolicy":{"type":"object","properties":{"deny_messages":{"type":"array","items":{"type":"string"},"description":"The values of any `deny` rego rules as returned by the rego engine"},"output":{"description":"The output returned by the rego engine when this policy was evaluated"},"policy":{"$ref":"#/components/schemas/Policy"},"rego_error":{"type":"string","description":"Any errors returned by the rego engine when this policy was evaluated"},"status":{"type":"string","description":"The overall status for this individual policy indicating whether it passed","enum":["error","warning","pass"]}},"required":["status","policy","output","deny_messages","rego_error"]},"Policy":{"type":"object","properties":{"account_id":{"type":"string","description":"Harness account ID associated with this policy","default":""},"created":{"type":"integer","description":"Time the policy was created","format":"int64"},"identifier":{"type":"string","description":"identifier of the policy","minLength":1},"name":{"type":"string","description":"Name of the policy","minLength":1},"org_id":{"type":"string","description":"Harness organization ID associated with this policy","default":""},"project_id":{"type":"string","description":"Harness project ID associated with this policy","default":""},"rego":{"type":"string","description":"Rego that defines the policy","minLength":1},"updated":{"type":"integer","description":"Time the policy was last updated","format":"int64"}},"required":["identifier","name","rego","created","updated","account_id","org_id","project_id"]},"AnsiblePolicyViolationError":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?"},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem."},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem."},"name":{"type":"string","description":"Name is the name of this class of errors."},"policy_evaluation":{"$ref":"#/components/schemas/AnsibleEvaluation"},"temporary":{"type":"boolean","description":"Is the error temporary?"},"timeout":{"type":"boolean","description":"Is the error a timeout?"}},"required":["name","id","message","temporary","timeout","fault"]},"AnsibleError":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?"},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem."},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem."},"name":{"type":"string","description":"Name is the name of this class of errors."},"temporary":{"type":"boolean","description":"Is the error temporary?"},"timeout":{"type":"boolean","description":"Is the error a timeout?"}},"required":["name","id","message","temporary","timeout","fault"]}}}}
```
