# awx hosts list filtering on variables

**URL:** <https://forum.ansible.com/t/awx-hosts-list-filtering-on-variables/33695>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [August 28, 2020, 1:53pm UTC](https://forum.ansible.com/t/awx-hosts-list-filtering-on-variables/33695 "2020-08-28T13:53:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicolas\_Payart](https://avatars.discourse-cdn.com/v4/letter/n/77aa72/32.png) [@Nicolas\_Payart](https://forum.ansible.com/u/Nicolas_Payart)\
**Post date:** [August 28, 2020, 1:53pm UTC](https://forum.ansible.com/t/awx-hosts-list-filtering-on-variables/33695/1 "2020-08-28T13:53:04Z")

</div>

Hi,

I am using **awxkit** command line v13.0.0.

I wonder how to use filtering on variables when listing hosts with “awx hosts list” command.

I tried argument --variables with a yaml/json format without success: it always return an empty set.

# trying in YAML format

**awx hosts list --variables ‘arch: amd64’**  
{  
“count”: 0,  
“next”: null,  
“previous”: null,  
“results”:   
}

# trying in JSON format

**awx hosts list --variables ‘{“arch”: “amd64”}’**  
{  
“count”: 0,  
“next”: null,  
“previous”: null,  
“results”:   
}

However I have at least one host that matches that variable:

**awx hosts list**

{  
“count”: 40,  
“next”: “/api/v2/hosts/?page=2”,  
“previous”: null,  
“results”: [  
…  
{  
“id”: 31,  
…  
“variables”: “{"arch": "amd64"}”,  
…  
},  
…  
]  
}

Maybe I am not using the right format for --variables option? Or should I fill a bug report?

Thanks,  
Nico
