# AWX - Inventories - Can't save

**URL:** <https://forum.ansible.com/t/awx-inventories-cant-save/30405>\
**Category:** Ansible Project\
**Tags:** awx\
**Created:** [May 23, 2019, 1:01pm UTC](https://forum.ansible.com/t/awx-inventories-cant-save/30405 "2019-05-23T13:01:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simon\_Pole](https://avatars.discourse-cdn.com/v4/letter/s/6f9a4e/32.png) [@Simon\_Pole](https://forum.ansible.com/u/Simon_Pole)\
**Post date:** [May 23, 2019, 1:01pm UTC](https://forum.ansible.com/t/awx-inventories-cant-save/30405/1 "2019-05-23T13:01:21Z")

</div>

Hi,

I’m running AWX 4 and everything seems fine but when I go to inventories and add anything in the variables box I present me with a “Failed to add new inventory. Post returned status: 400”

 ![2019-05-23 13_59_21-Window.png](https://us1.discourse-cdn.com/ansible/original/2X/a/afae4217ff61846171c27c30493edc40be0bd0fa.png)

 ![2019-05-23 13_59_39-Window.png](https://us1.discourse-cdn.com/ansible/original/2X/5/555aecf2726337d30f3c2e30c38e5cb1e20e9180.png)

---

<div class="post-metadata">

**Author:** ![The\_Vandyy\_Vines](https://avatars.discourse-cdn.com/v4/letter/t/7993a0/32.png) [@The\_Vandyy\_Vines](https://forum.ansible.com/u/The_Vandyy_Vines)\
**Post date:** [May 23, 2019, 1:08pm UTC](https://forum.ansible.com/t/awx-inventories-cant-save/30405/2 "2019-05-23T13:08:55Z")

</div>

400 error is bad request .

So i think the format in which you are passing the variable is incorrect .

Like try the correct json format .

> **(attachments)**
>
> ![2019-05-23 13_59_21-Window.png](https://us1.discourse-cdn.com/ansible/original/2X/a/afae4217ff61846171c27c30493edc40be0bd0fa.png)  
> ![2019-05-23 13_59_39-Window.png](https://us1.discourse-cdn.com/ansible/original/2X/5/555aecf2726337d30f3c2e30c38e5cb1e20e9180.png)

---

<div class="post-metadata">

**Author:** ![cava\_cavamagie](https://avatars.discourse-cdn.com/v4/letter/c/e68b1a/32.png) [@cava\_cavamagie](https://forum.ansible.com/u/cava_cavamagie)\
**Post date:** [May 23, 2019, 1:28pm UTC](https://forum.ansible.com/t/awx-inventories-cant-save/30405/3 "2019-05-23T13:28:48Z")

</div>

if you enter  
a valid variable?  
lite

> **(attachments)**
>
> ![2019-05-23 13_59_21-Window.png](https://us1.discourse-cdn.com/ansible/original/2X/a/afae4217ff61846171c27c30493edc40be0bd0fa.png)  
> ![2019-05-23 13_59_39-Window.png](https://us1.discourse-cdn.com/ansible/original/2X/5/555aecf2726337d30f3c2e30c38e5cb1e20e9180.png)

---

<div class="post-metadata">

**Author:** ![The\_Vandyy\_Vines](https://avatars.discourse-cdn.com/v4/letter/t/7993a0/32.png) [@The\_Vandyy\_Vines](https://forum.ansible.com/u/The_Vandyy_Vines)\
**Post date:** [May 23, 2019, 1:30pm UTC](https://forum.ansible.com/t/awx-inventories-cant-save/30405/4 "2019-05-23T13:30:04Z")

</div>

Yes i think so . Try once with this

> **(attachments)**
>
> ![2019-05-23 13_59_21-Window.png](https://us1.discourse-cdn.com/ansible/original/2X/a/afae4217ff61846171c27c30493edc40be0bd0fa.png)  
> ![2019-05-23 13_59_39-Window.png](https://us1.discourse-cdn.com/ansible/original/2X/5/555aecf2726337d30f3c2e30c38e5cb1e20e9180.png)

---

<div class="post-metadata">

**Author:** ![Simon\_Pole](https://avatars.discourse-cdn.com/v4/letter/s/6f9a4e/32.png) [@Simon\_Pole](https://forum.ansible.com/u/Simon_Pole)\
**Post date:** [May 23, 2019, 2:05pm UTC](https://forum.ansible.com/t/awx-inventories-cant-save/30405/5 "2019-05-23T14:05:10Z")

</div>

Thanks for the input, I was being stupid.  
My vars on my computer where I’ve historically run the playbook have been:

ansible\_user=xxxxxxx

on AWX is expects its in yaml as

ansible\_user: xxxxxxx

Cheers for the input!

---

<div class="post-metadata">

**Author:** ![The\_Vandyy\_Vines](https://avatars.discourse-cdn.com/v4/letter/t/7993a0/32.png) [@The\_Vandyy\_Vines](https://forum.ansible.com/u/The_Vandyy_Vines)\
**Post date:** [May 23, 2019, 2:06pm UTC](https://forum.ansible.com/t/awx-inventories-cant-save/30405/6 "2019-05-23T14:06:33Z")

</div>

Glad to help 🙂
