# Force a task even if --tags or --limit is provided

**URL:** <https://forum.ansible.com/t/force-a-task-even-if-tags-or-limit-is-provided/13882>\
**Category:** Ansible Project\
**Created:** [November 11, 2013, 5:29pm UTC](https://forum.ansible.com/t/force-a-task-even-if-tags-or-limit-is-provided/13882 "2013-11-11T17:29:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guillaume\_Subiron](https://avatars.discourse-cdn.com/v4/letter/g/c77e96/32.png) [@Guillaume\_Subiron](https://forum.ansible.com/u/Guillaume_Subiron)\
**Post date:** [November 11, 2013, 5:29pm UTC](https://forum.ansible.com/t/force-a-task-even-if-tags-or-limit-is-provided/13882/1 "2013-11-11T17:29:35Z")

</div>

Sometimes, we have a task which has to be executed everytime. For  
instance, I have a playbook saying :

- hosts: all  
&nbsp;&nbsp;pre\_tasks:  
&nbsp;&nbsp;&nbsp;&nbsp;- action: site\_facts  
&nbsp;&nbsp;roles:  
&nbsp;&nbsp;&nbsp;&nbsp;- { role: common, when: some\_var\_provided\_by\_site\_facts }

So site\_facts has to be executed even if I use --tags or --limit when  
calling ansible-playbook. Is there a way to do this ?

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [November 12, 2013, 3:55pm UTC](https://forum.ansible.com/t/force-a-task-even-if-tags-or-limit-is-provided/13882/2 "2013-11-12T15:55:39Z")

</div>

With tags, I would tag it “common” and make sure you do --tags common every time.

For the limit question and picking a server that’s not in the limit group, I’d probably just add it to the limit group also:

ansible-playbook foo.yml --limit selectedgroup:localhost

And include localhost.
