# How can I filter some host via openstack.py

**URL:** <https://forum.ansible.com/t/how-can-i-filter-some-host-via-openstack-py/22927>\
**Category:** Ansible Project\
**Created:** [October 31, 2016, 9:02am UTC](https://forum.ansible.com/t/how-can-i-filter-some-host-via-openstack-py/22927 "2016-10-31T09:02:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yang\_Liu](https://avatars.discourse-cdn.com/v4/letter/y/fbc32d/32.png) [@Yang\_Liu](https://forum.ansible.com/u/Yang_Liu)\
**Post date:** [October 31, 2016, 9:02am UTC](https://forum.ansible.com/t/how-can-i-filter-some-host-via-openstack-py/22927/1 "2016-10-31T09:02:11Z")

</div>

Hi all:

I use this [https://github.com/ansible/ansible/blob/devel/contrib/inventory/openstack.py](https://github.com/ansible/ansible/blob/devel/contrib/inventory/openstack.py) to get a dynamic inventory from openstack.

/etc/ansible/openstack.py --list will list all host which in a openstack project,but if I want skip some hosts that I dont want ansible to access,How can I do that?

seems there is no doc for this script. should I do some hack for this script?
