# Awx.awx.inventory is failing to create constructed inventories - potential edge case?

**URL:** <https://forum.ansible.com/t/awx-awx-inventory-is-failing-to-create-constructed-inventories-potential-edge-case/6845>\
**Category:** Get Help\
**Tags:** awx, collections\
**Created:** [June 28, 2024, 5:14pm UTC](https://forum.ansible.com/t/awx-awx-inventory-is-failing-to-create-constructed-inventories-potential-edge-case/6845 "2024-06-28T17:14:20Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![cnfrancis](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/cnfrancis/32/2615_2.png) [@cnfrancis](https://forum.ansible.com/u/cnfrancis)\
**Post date:** [June 28, 2024, 5:14pm UTC](https://forum.ansible.com/t/awx-awx-inventory-is-failing-to-create-constructed-inventories-potential-edge-case/6845/1 "2024-06-28T17:14:20Z")

</div>

hello!

I dug a bit in the code and found this edge case for collection `awx.awx.inventory`  
The function `make_request` is used for creating new/updating awx resource AND also used for retrieving existing associations.

So, when a new resource is created and has associations with it, the code will check for existing associations and it will exit right away if it gets a 404 because the self.fail\_json() is called when a 404 is received. [awx/awx\_collection/plugins/module\_utils/controller\_api.py at a70b0c1ddc35a03701372d0a921fba5bb14264f5 · ansible/awx · GitHub](https://github.com/ansible/awx/blob/a70b0c1ddc35a03701372d0a921fba5bb14264f5/awx_collection/plugins/module_utils/controller_api.py#L534)

For example, when I create a new constructed inventory,

- It first makes a POST to create the constructed inventory
- Makes a get request to retrieve all endpoints (existing associations)  
Fails with error below

“msg”: “The requested object could not be found at /api/v2/constructed\_inventories/24/input\_inventories/”

args used below: (with AWX → UI version=22.0.0, Operator=2.0.0)

```auto
{
    "ANSIBLE_MODULE_ARGS": {
        "_ansible_check_mode": false,
        "_ansible_debug": false,
        "_ansible_diff": false,
        "_ansible_ignore_unknown_opts": false,
        "_ansible_keep_remote_files": true,
        "_ansible_module_name": "awx.awx.inventory",
        "_ansible_no_log": false,
        "_ansible_remote_tmp": "~/.ansible/tmp",
        "_ansible_selinux_special_fs": [
            "fuse",
            "nfs",
            "vboxsf",
            "ramfs",
            "9p",
            "vfat"
        ],
        "_ansible_shell_executable": "/bin/sh",
        "_ansible_socket": null,
        "_ansible_string_conversion_action": "warn",
        "_ansible_syslog_facility": "LOG_USER",
        "_ansible_target_log_info": null,
        "_ansible_tmpdir": "REDACTED",
        "_ansible_verbosity": 3,
        "_ansible_version": "2.17.1",
        "controller_host": "REDACTED",
        "input_inventories": [
            "REDACTED"
        ],
        "organization": "REDACTED",
        "kind": "constructed",
        "name": "REDACTED",        
        "controller_username": "REDACTED",        
        "controller_password": "REDACTED"
    }
}

```

OR

Maybe the edge case is that builds the url wrong when retrieving the existing associations for a constructed inventory. When I reverse engineer the api call from the UI, it makes a POST request to  
https://.com/api/v2/inventories/24/input\_inventories/  
NOT  
https://.com/api/v2/constructed\_inventories/24/input\_inventories/

Can someone help me with this please with a course of action to take?

---

<div class="post-metadata">

**Author:** ![Denney-tech](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/denney-tech/32/1556_2.png) [@Denney-tech](https://forum.ansible.com/u/Denney-tech)\
**Post date:** [June 28, 2024, 7:16pm UTC](https://forum.ansible.com/t/awx-awx-inventory-is-failing-to-create-constructed-inventories-potential-edge-case/6845/2 "2024-06-28T19:16:25Z")

</div>

> [@cnfrancis](#):
>
> Maybe the edge case is that builds the url wrong when retrieving the existing associations for a constructed inventory. When I reverse engineer the api call from the UI, it makes a POST request to  
> https://.com/api/v2/inventories/21/input\_inventories/  
> NOT  
> https://.com/api/v2/constructed\_inventories/24/input\_inventories/

Did the inventory ID change or have a mismatch? Or did you typo 21/24? From what I can tell, all inventories, constructed or not, appear in the inventories api endpoint. However, only constructed inventories will have `inventories/<id>/input_inventories`. Since you’re getting a 404 at that endpoint, I would think that the inventory name to id resolver found an existing regular or smart inventory by that name instead of updating or creating a constructed inventory.

---

<div class="post-metadata">

**Author:** ![cnfrancis](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/cnfrancis/32/2615_2.png) [@cnfrancis](https://forum.ansible.com/u/cnfrancis)\
**Post date:** [June 28, 2024, 7:34pm UTC](https://forum.ansible.com/t/awx-awx-inventory-is-failing-to-create-constructed-inventories-potential-edge-case/6845/3 "2024-06-28T19:34:19Z")

</div>

hello Caleb, sorry this ID was a typo ( as i was building and deleting inventories a few time for testing, must have miscopied)

Checking further in the code: [awx/awx\_collection/plugins/module\_utils/controller\_api.py at a70b0c1ddc35a03701372d0a921fba5bb14264f5 · ansible/awx · GitHub](https://github.com/ansible/awx/blob/a70b0c1ddc35a03701372d0a921fba5bb14264f5/awx_collection/plugins/module_utils/controller_api.py#L832)  
, I think its because AWX return the `item_url` for constructed inventories as `/api/v2/constructed_inventories/<id>` which is used here: [awx/awx\_collection/plugins/module\_utils/controller\_api.py at a70b0c1ddc35a03701372d0a921fba5bb14264f5 · ansible/awx · GitHub](https://github.com/ansible/awx/blob/a70b0c1ddc35a03701372d0a921fba5bb14264f5/awx_collection/plugins/module_utils/controller_api.py#L845)

so when it tries to get all endpoints for `input_inventories` with the URL built wrong it will throw the 404:  
code at L718 ( i can’t add more than two links per post)

---

<div class="post-metadata">

**Author:** ![cnfrancis](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/cnfrancis/32/2615_2.png) [@cnfrancis](https://forum.ansible.com/u/cnfrancis)\
**Post date:** [June 28, 2024, 7:40pm UTC](https://forum.ansible.com/t/awx-awx-inventory-is-failing-to-create-constructed-inventories-potential-edge-case/6845/4 "2024-06-28T19:40:39Z")

</div>

> [@Denney-tech](#):
>
> Since you’re getting a 404 at that endpoint, I would think that the inventory name to id resolver found an existing regular or smart inventory by that name instead of updating or creating a constructed inventory.

ah thanks for confirming `inventories/<id>/input_inventories`  
so the url is indeed built wrong for constructed inventories when adding `input_inventories` to `constructed_inventories`

for reference this is the call with the data

```auto
'https://<REDACTED>.com/api/v2/inventories/'
'{"name": "REDACTED", "organization": 2, "kind": "constructed", "host_filter": null, "input_inventories": [2]}'

```

---

<div class="post-metadata">

**Author:** ![cnfrancis](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/cnfrancis/32/2615_2.png) [@cnfrancis](https://forum.ansible.com/u/cnfrancis)\
**Post date:** [July 2, 2024, 1:29pm UTC](https://forum.ansible.com/t/awx-awx-inventory-is-failing-to-create-constructed-inventories-potential-edge-case/6845/5 "2024-07-02T13:29:13Z")

</div>

@Denney-tech i’ve raised this issue: [The module awx.awx.inventory is failing to create constructed inventories - Edge case uncaught · Issue #15310 · ansible/awx (github.com)](https://github.com/ansible/awx/issues/15310)

---

<div class="post-metadata">

**Author:** ![Denney-tech](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/denney-tech/32/1556_2.png) [@Denney-tech](https://forum.ansible.com/u/Denney-tech)\
**Post date:** [July 2, 2024, 2:16pm UTC](https://forum.ansible.com/t/awx-awx-inventory-is-failing-to-create-constructed-inventories-potential-edge-case/6845/6 "2024-07-02T14:16:16Z")

</div>

And you’re certain that the inventory “name” doesn’t match an existing inventory of a different “kind”? (normal or smart inventories)

---

<div class="post-metadata">

**Author:** ![cnfrancis](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/cnfrancis/32/2615_2.png) [@cnfrancis](https://forum.ansible.com/u/cnfrancis)\
**Post date:** [July 2, 2024, 2:58pm UTC](https://forum.ansible.com/t/awx-awx-inventory-is-failing-to-create-constructed-inventories-potential-edge-case/6845/7 "2024-07-02T14:58:03Z")

</div>

yes, it doesn’t match an existing inventory of a different kind

---

<div class="post-metadata">

**Author:** ![Denney-tech](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/denney-tech/32/1556_2.png) [@Denney-tech](https://forum.ansible.com/u/Denney-tech)\
**Post date:** [July 2, 2024, 3:58pm UTC](https://forum.ansible.com/t/awx-awx-inventory-is-failing-to-create-constructed-inventories-potential-edge-case/6845/8 "2024-07-02T15:58:31Z")

</div>

I’ll see if I can try and reproduce this later this week. The 404 for the constructed\_inventory endpoint makes me think there’s a problem with the name-to-id resolver or that the inventory kind isn’t defined properly when the constructed inventory is created.

---

<div class="post-metadata">

**Author:** ![cnfrancis](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/cnfrancis/32/2615_2.png) [@cnfrancis](https://forum.ansible.com/u/cnfrancis)\
**Post date:** [July 2, 2024, 4:41pm UTC](https://forum.ansible.com/t/awx-awx-inventory-is-failing-to-create-constructed-inventories-potential-edge-case/6845/9 "2024-07-02T16:41:22Z")

</div>

i’ve pinpoint the issue in a few code snippets with the issue that I linked.  
tldr  
1- it returns the url `constructed_inventories/<id>` after the inventory is created  
2- when it checks for associations in this case the input\_inventories, it uses the url above to build the irl, so you get `<awx-endpoint>.com/api/v2/constructed_inventories/<id>/input_inventories` instead of `<awx-endpoint>.com/api/v2/inventories/<id>/input_inventories`

---

<div class="post-metadata">

**Author:** ![Denney-tech](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/denney-tech/32/1556_2.png) [@Denney-tech](https://forum.ansible.com/u/Denney-tech)\
**Post date:** [July 2, 2024, 4:46pm UTC](https://forum.ansible.com/t/awx-awx-inventory-is-failing-to-create-constructed-inventories-potential-edge-case/6845/10 "2024-07-02T16:46:50Z")

</div>

But both of those should be valid for a constructed inventory…

Edit: OH… I see where I’m getting confused. Both the `inventories/<ID>` and `constructed_inventories/<ID>` mention `inventories/<id>/input_inventories` in the related objects, but there is no `constructed_inventories/<id>/input_inventories` endpoint specifically. Which makes me wonder why the `constructed_inventories` exists at all.

---

<div class="post-metadata">

**Author:** ![cnfrancis](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/cnfrancis/32/2615_2.png) [@cnfrancis](https://forum.ansible.com/u/cnfrancis)\
**Post date:** [July 2, 2024, 5:02pm UTC](https://forum.ansible.com/t/awx-awx-inventory-is-failing-to-create-constructed-inventories-potential-edge-case/6845/11 "2024-07-02T17:02:06Z")

</div>

exactly you got it right, its a bug in the code, mind giving a thumbs up to my issue please?

> <https://github.com/ansible/awx/issues/15310>
>
> \### Please confirm the following
> 
> \- \[X\] I agree to follow this project's \[code… of conduct\](https://docs.ansible.com/ansible/latest/community/code\_of\_conduct.html).
> \- \[X\] I have checked the \[current issues\](https://github.com/ansible/awx/issues) for duplicates.
> \- \[X\] I understand that AWX is open source software provided for free and that I might not receive a timely response.
> \- \[X\] I am \*\*NOT\*\* reporting a (potential) security vulnerability. (These should be emailed to \`security@ansible.com\` instead.)
> 
> \### Bug Summary
> 
> \### Edge Case
> hello, I believe there is an edge case uncaught with the module \`awx.awx.inventory\` when attempting to add an \`input\_inventories\` which causes the error message below:
> \`\`\`
> “msg”: “The requested object could not be found at /api/v2/constructed\_inventories/24/input\_inventories/” 
> \`\`\`
> 
> It's due to the fact the URL built is wrong when adding an \`associations\` of type \`input\_inventories\` to a resource \`constructed\_inventory\` 
> 
> Related discussion: https://forum.ansible.com/t/awx-awx-inventory-is-failing-to-create-constructed-inventories-potential-edge-case/6845
> 
> 
> 
> \### Problematic Code Snippets
> 
> I believe the problematic code that caused the URL to be built wrong and cause the \`404\` to happen is combination of the snippets below in \`awx/awx\_collection/plugins/module\_utils/controller\_api.py\`
> 
> \`\`\`
> \# awx/awx\_collection/plugins/module\_utils/controller\_api.py
> def create\_if\_needed(self, existing\_item, new\_item, endpoint, on\_create=None, auto\_exit=True, item\_type='unknown', associations=None):
> 
> ...
> 
> if response\['status\_code'\] in \[200, 201\]:
> self.json\_output\['name'\] = 'unknown'
> for key in ('name', 'username', 'identifier', 'hostname'):
> if key in response\['json'\]:
> self.json\_output\['name'\] = response\['json'\]\[key\]
> self.json\_output\['id'\] = response\['json'\]\['id'\]
> self.json\_output\['changed'\] = True
> item\_url = response\['json'\]\['url'\]
> else:
> if 'json' in response and '\_\_all\_\_' in response\['json'\]:
> self.fail\_json(msg="Unable to create {0} {1}: {2}".format(item\_type, item\_name, response\['json'\]\['\_\_all\_\_'\]\[0\]))
> elif 'json' in response:
> self.fail\_json(msg="Unable to create {0} {1}: {2}".format(item\_type, item\_name, response\['json'\]))
> else:
> self.fail\_json(msg="Unable to create {0} {1}: {2}".format(item\_type, item\_name, response\['status\_code'\]))
> 
> # Process any associations with this item
> if associations is not None:
> for association\_type in associations:
> sub\_endpoint = '{0}{1}/'.format(item\_url, association\_type)
> self.modify\_associations(sub\_endpoint, associations\[association\_type\])
> \`\`\`
> 
> and
> \`\`\`
> \# awx/awx\_collection/plugins/module\_utils/controller\_api.py
> def modify\_associations(self, association\_endpoint, new\_association\_list):
> # if we got None instead of \[\] we are not modifying the association\_list
> if new\_association\_list is None:
> return
> 
> # First get the existing associations
> response = self.get\_all\_endpoint(association\_endpoint)
> existing\_associated\_ids = \[association\['id'\] for association in response\['json'\]\['results'\]\]
> \`\`\`
> 
> 
> 
> \### Explanation
> 
> In \`ControllerAPIModule.create\_if\_needed(self)\` (\[code ref link\](https://github.com/ansible/awx/blob/b59aff50dc28a9da0a18155227974443b19afb18/awx\_collection/plugins/module\_utils/controller\_api.py#L832C17-L832C26)) 
> 
> The url and the body for the POST call
> \`\`\`
> 'https://\<REDACTED\>.com/api/v2/inventories/'
> '{"name": "REDACTED", "organization": 2, "kind": "constructed", "host\_filter": null, "input\_inventories": \[2\]}'
> \`\`\`
> will yield the successful response 
> \`\`\`
> response\['json'\]\['url'\] = /api/v2/constructed\_inventories/\<id\>
> \`\`\`
> 
> this is then stored in \`item\_url\` which used to build the association \`sub\_endpoint\` (\[code ref link\](https://github.com/ansible/awx/blob/b59aff50dc28a9da0a18155227974443b19afb18/awx\_collection/plugins/module\_utils/controller\_api.py#L844))
> 
> \`sub\_endpoint=/api/v2/constructed\_inventories/\<id\>/input\_inventories 
> \`\`\`
> if associations is not None:
> for association\_type in associations:
> sub\_endpoint = '{0}{1}/'.format(item\_url, association\_type)
> self.modify\_associations(sub\_endpoint, associations\[association\_type\])
> \`\`\`
> then later on, when \`self.get\_all\_endpoint(association\_endpoint)\` which calls \`response = self.get\_endpoint(endpoint, \*args, \*\*kwargs)\` with this \`/api/v2/constructed\_inventories/\<id\>/input\_inventories \` it will cause the 404 as that enpoint isn't defined.
> \`\`\`
> def modify\_associations(self, association\_endpoint, new\_association\_list):
> # if we got None instead of \[\] we are not modifying the association\_list
> if new\_association\_list is None:
> return
> 
> # First get the existing associations
> response = self.get\_all\_endpoint(association\_endpoint)
> existing\_associated\_ids = \[association\['id'\] for association in response\['json'\]\['results'\]\]
> \`\`\`
> 
> Hope this makes sense. Please let me know what the action items are from this, or suggested course of action I can take.
> 
> 
> FYI @TheRealHaoLiu @relrod (@cidrblock fom AnsibleFest 2024 conference Denver, US )
> 
> \### AWX version
> 
> 22.0.0
> 
> \### Select the relevant components
> 
> \- \[\] UI
> \- \[\] UI (tech preview)
> \- \[\] API
> \- \[\] Docs
> \- \[X\] Collection
> \- \[\] CLI
> \- \[\] Other
> 
> \### Installation method
> 
> kubernetes
> 
> \### Modifications
> 
> no
> 
> \### Ansible version
> 
> 2.17.1
> 
> \### Operating system
> 
> \_No response\_
> 
> \### Web browser
> 
> \_No response\_
> 
> \### Steps to reproduce
> 
> \- \`ANSIBLE\_KEEP\_REMOTE\_FILES=1 ansible localhost -m awx.awx.inventory -a '\<module\_args\>' -vvv\`
> \- \`cd /path/to/temporary/file\`
> \- \`python AnsiballZ\_inventory.py explode\`
> \- \`python AnsiballZ\_inventory.py execute\`
> 
> this assumes an inventory already exists when added to the \`input\_inventory\` field.
> used arguments:
> \`\`\`
> {
> "ANSIBLE\_MODULE\_ARGS": {
> "\_ansible\_check\_mode": false,
> "\_ansible\_debug": false,
> "\_ansible\_diff": false,
> "\_ansible\_ignore\_unknown\_opts": false,
> "\_ansible\_keep\_remote\_files": true,
> "\_ansible\_module\_name": "awx.awx.inventory",
> "\_ansible\_no\_log": false,
> "\_ansible\_remote\_tmp": "~/.ansible/tmp",
> "\_ansible\_selinux\_special\_fs": \[
> "fuse",
> "nfs",
> "vboxsf",
> "ramfs",
> "9p",
> "vfat"
> \],
> "\_ansible\_shell\_executable": "/bin/sh",
> "\_ansible\_socket": null,
> "\_ansible\_string\_conversion\_action": "warn",
> "\_ansible\_syslog\_facility": "LOG\_USER",
> "\_ansible\_target\_log\_info": null,
> "\_ansible\_tmpdir": "REDACTED",
> "\_ansible\_verbosity": 3,
> "\_ansible\_version": "2.17.1",
> "controller\_host": "REDACTED",
> "input\_inventories": \[
> "REDACTED"
> \],
> "organization": "REDACTED",
> "kind": "constructed",
> "name": "REDACTED",        
> "controller\_username": "REDACTED",        
> "controller\_password": "REDACTED"
> }
> }
> \`\`\`
> 
> 
> \### Expected results
> 
> The built URL should be \`inventories/\<id\>/input\_inventories\` when adding association of type \`input\_inventories\` to a \`construced\_inventory\`
> 
> \### Actual results
> 
> \`\`\`
> “msg”: “The requested object could not be found at /api/v2/constructed\_inventories/24/input\_inventories/”
> \`\`\`
> 
> \### Additional information
> 
> \#13448 
> Commit: https://github.com/ansible/awx/commit/e22967d28de40fe40d94fd4818aa9248942f6b4c

---

<div class="post-metadata">

**Author:** ![Denney-tech](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/denney-tech/32/1556_2.png) [@Denney-tech](https://forum.ansible.com/u/Denney-tech)\
**Post date:** [July 2, 2024, 5:22pm UTC](https://forum.ansible.com/t/awx-awx-inventory-is-failing-to-create-constructed-inventories-potential-edge-case/6845/12 "2024-07-02T17:22:30Z")

</div>

I think your bug was already identified and fixed in AWX 22.1.0. Please upgrade and try again.

---

<div class="post-metadata">

**Author:** ![cnfrancis](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/cnfrancis/32/2615_2.png) [@cnfrancis](https://forum.ansible.com/u/cnfrancis)\
**Post date:** [July 2, 2024, 5:49pm UTC](https://forum.ansible.com/t/awx-awx-inventory-is-failing-to-create-constructed-inventories-potential-edge-case/6845/13 "2024-07-02T17:49:00Z")

</div>

that’s actually contributing to the bug [Only use constr. inv URL when req comes from it by relrod · Pull Request #13797 · ansible/awx · GitHub](https://github.com/ansible/awx/pull/13797/files)  
what this PR does for version AWX 22.1.0 is returning `construced_inventories/<id>` in the response instead of `inventories/<id>` as the URL

but the issue is not with awx itself. It is with the ansible module using that `construced_inventories/<id>` url that is returned in the response for querying the input\_inventories which only exists under `inventories/<id>/input_inventories` and not `construced_inventories/<id>/input_inventories`

---

<div class="post-metadata">

**Author:** ![Denney-tech](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/denney-tech/32/1556_2.png) [@Denney-tech](https://forum.ansible.com/u/Denney-tech)\
**Post date:** [July 2, 2024, 6:22pm UTC](https://forum.ansible.com/t/awx-awx-inventory-is-failing-to-create-constructed-inventories-potential-edge-case/6845/14 "2024-07-02T18:22:23Z")

</div>

Prior to the change, the API _always_ returns the constructed\_inventories prefix for `kind=="constructed"`, which is what you’re seeing. That PR changes it to match the request, so when you’re posting the constructed inventory to `inventories` , the API won’t redirect you unexpectedly to `constructed_inventories`.

---

<div class="post-metadata">

**Author:** ![cnfrancis](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/cnfrancis/32/2615_2.png) [@cnfrancis](https://forum.ansible.com/u/cnfrancis)\
**Post date:** [July 2, 2024, 6:46pm UTC](https://forum.ansible.com/t/awx-awx-inventory-is-failing-to-create-constructed-inventories-potential-edge-case/6845/15 "2024-07-02T18:46:56Z")

</div>

I will give it a go and get back with my findings

---

<div class="post-metadata">

**Author:** ![Denney-tech](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/denney-tech/32/1556_2.png) [@Denney-tech](https://forum.ansible.com/u/Denney-tech)\
**Post date:** [July 2, 2024, 7:18pm UTC](https://forum.ansible.com/t/awx-awx-inventory-is-failing-to-create-constructed-inventories-potential-edge-case/6845/16 "2024-07-02T19:18:44Z")

</div>

I think that should solve it because I cannot replicate your issue on 24.6.0.

```yaml
- hosts: localhost
  gather_facts: false
  vars:
    awx_username: redacted
    awx_password: redacted
    awx_host: redacted
  tasks:
    - awx.awx.inventory:
        controller_host: "https://{{ awx_host }}"
        controller_username: "{{ awx_username }}"
        controller_password: "{{ awx_password }}"
        name: foobar
        organization: Linux
        kind: constructed
        input_inventories:
          - Inventory

```

```auto
PLAY [localhost] *************************************************************************************************************************************************************************************

TASK [awx.awx.inventory] *****************************************************************************************************************************************************************************
changed: [localhost]

PLAY RECAP *******************************************************************************************************************************************************************************************
localhost : ok=1 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0

```

 ![image](https://us1.discourse-cdn.com/ansible/original/2X/a/a96befdc7c1c8278fb271d043c507f4a44a71e8f.png)

---

<div class="post-metadata">

**Author:** ![cnfrancis](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/cnfrancis/32/2615_2.png) [@cnfrancis](https://forum.ansible.com/u/cnfrancis)\
**Post date:** [July 10, 2024, 1:22pm UTC](https://forum.ansible.com/t/awx-awx-inventory-is-failing-to-create-constructed-inventories-potential-edge-case/6845/17 "2024-07-10T13:22:14Z")

</div>

upgrading to the latest version worked, thanks for the suggestion Caleb that fixed my issue.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [August 9, 2024, 1:22pm UTC](https://forum.ansible.com/t/awx-awx-inventory-is-failing-to-create-constructed-inventories-potential-edge-case/6845/18 "2024-08-09T13:22:57Z")

</div>

Closed on August 9, 2024, 1:22pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
