# Force --Limit on Playbooks

**URL:** <https://forum.ansible.com/t/force-limit-on-playbooks/27230>\
**Category:** Ansible Developer\
**Created:** [April 10, 2018, 8:38am UTC](https://forum.ansible.com/t/force-limit-on-playbooks/27230 "2018-04-10T08:38:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pat](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@Pat](https://forum.ansible.com/u/Pat)\
**Post date:** [April 10, 2018, 8:38am UTC](https://forum.ansible.com/t/force-limit-on-playbooks/27230/1 "2018-04-10T08:38:02Z")

</div>

Hello everyone,

I really like the functionality wit ad-hoc commands, that you have to target your commands to a specific host, group or all in order to make the command work.  
With Playbooks there is a similiar behaviour with --limits, but if i forget so set the -l option in my command the playbook will target all hosts. I would like to avoid this potentially point of failure.  
So is there a way to force ansible (like ad-hoc commands) to only execute a playbook when there is a specific host or group?

I know you could make the host value to a variable like hosts={hoststotarget}, but i hoped someone has a better solution which is more like the ad-hoc commands.

Thx and best regards  
Pat
