> 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/create-dynamic-ansible-playbook-variable-on-org-level.md).

# Create dynamic Ansible playbook variable on org level

Create a new dynamic variable on an org scoped playbook.

```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}/ansible/playbook/{identifier}/vars":{"post":{"tags":["ansible"],"summary":"Create dynamic Ansible playbook variable on org level","description":"Create a new dynamic variable on an org scoped playbook.","operationId":"ansible#create-playbook-vars-org-level","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":"identifier","in":"path","description":"The unique identifier for this playbook","required":true,"schema":{"type":"string","description":"The unique identifier for this playbook"}},{"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/CreatePlaybookVarOrgLevelRequest"}}}},"responses":{"201":{"description":"Created response."},"400":{"description":"BadRequestError: Bad Request response.","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/AnsibleError"}}}},"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":{"CreatePlaybookVarOrgLevelRequest":{"type":"object","properties":{"env_vars":{"type":"array","items":{"$ref":"#/components/schemas/HarnessIacmInventoryVarCreate"}},"vars":{"type":"array","items":{"$ref":"#/components/schemas/HarnessIacmInventoryVarCreate"}}},"required":["vars"]},"HarnessIacmInventoryVarCreate":{"type":"object","properties":{"file_name":{"type":"string","description":"Filename is where to store the value of the secret."},"key":{"type":"string","description":"Key is the identifier for the secret.","pattern":"^[a-zA-Z0-9_]+$","minLength":1,"maxLength":128},"uuid":{"type":"string","description":"UUID is the unique identifier for the secret."},"value":{"type":"string","description":"Value is the value of the secret."},"value_type":{"type":"string","description":"Type indecates the value type of the secret. In the case of secret this is a\nreference to an item in the secret store"},"var_type":{"type":"string","description":"The type of variable. eg: var, env_var"}},"required":["key","value","value_type"]},"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"]}}}}
```
