# conditional options for the command module beyond creates, and removes

**URL:** <https://forum.ansible.com/t/conditional-options-for-the-command-module-beyond-creates-and-removes/15512>\
**Category:** Ansible Project\
**Created:** [June 20, 2014, 4:55am UTC](https://forum.ansible.com/t/conditional-options-for-the-command-module-beyond-creates-and-removes/15512 "2014-06-20T04:55:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Dur](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Michael\_Dur](https://forum.ansible.com/u/Michael_Dur)\
**Post date:** [June 20, 2014, 4:55am UTC](https://forum.ansible.com/t/conditional-options-for-the-command-module-beyond-creates-and-removes/15512/1 "2014-06-20T04:55:42Z")

</div>

I see a need for running a command remotely to determine whether a command play should be executed. There is a lot that ‘creates’, and ‘removes’ doesn’t cover. I’d like to support file test operators and more. I realize this could be accomplished using a preceding command play that sets a variable. Does this seem worthwhile, or is there another way?

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [June 20, 2014, 8:54pm UTC](https://forum.ansible.com/t/conditional-options-for-the-command-module-beyond-creates-and-removes/15512/2 "2014-06-20T20:54:44Z")

</div>

The “when” conditional already exists in ansible for doing this for an arbitrary module, yes.

As such, we are unlikely to want to see arbitrary tests added to the command module.
