# Disable the all hosts directive

**URL:** <https://forum.ansible.com/t/disable-the-all-hosts-directive/23690>\
**Category:** Ansible Project\
**Created:** [February 9, 2017, 11:00am UTC](https://forum.ansible.com/t/disable-the-all-hosts-directive/23690 "2017-02-09T11:00:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kobus](https://avatars.discourse-cdn.com/v4/letter/k/e274bd/32.png) [@Kobus](https://forum.ansible.com/u/Kobus)\
**Post date:** [February 9, 2017, 11:00am UTC](https://forum.ansible.com/t/disable-the-all-hosts-directive/23690/1 "2017-02-09T11:00:22Z")

</div>

Hi

I am fairly new to ansible, but wanted to disable the all hosts directive. I want to force people to use a specific hosts group and never the all group. Biggest reason for this is the segregation of environment, mostly for PCI:DSS purposes.

Thanks

Kobus

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [February 9, 2017, 2:56pm UTC](https://forum.ansible.com/t/disable-the-all-hosts-directive/23690/2 "2017-02-09T14:56:28Z")

</div>

To my knowledge that is not possible.  
Why not split the inventory instead to achieve segregation that way?  
The all will only be for the host in that specific inventory.

[https://docs.ansible.com/ansible/playbooks\_best\_practices.html#alternative-directory-layout](https://docs.ansible.com/ansible/playbooks_best_practices.html#alternative-directory-layout)
