# Criteria for command module's "check command"

**URL:** <https://forum.ansible.com/t/criteria-for-command-modules-check-command/25652>\
**Category:** Ansible Developer\
**Tags:** aws\
**Created:** [October 1, 2017, 11:14pm UTC](https://forum.ansible.com/t/criteria-for-command-modules-check-command/25652 "2017-10-01T23:14:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yeukhon.tech.mailing](https://avatars.discourse-cdn.com/v4/letter/y/7ba0ec/32.png) [@yeukhon.tech.mailing](https://forum.ansible.com/u/yeukhon.tech.mailing)\
**Post date:** [October 1, 2017, 11:14pm UTC](https://forum.ansible.com/t/criteria-for-command-modules-check-command/25652/1 "2017-10-01T23:14:58Z")

</div>

I am working on this old issue [issue #30073](https://github.com/ansible/ansible/issues/30073). If someone runs one of these

`  
command: hg clone [https://bitbucket.org/yeukhon/hello](https://bitbucket.org/yeukhon/hello)

./hacking/test-module -m lib/ansible/modules/commands/command.py -a   
“hg clone [https://bitbucket.org/yeukhon/hello](https://bitbucket.org/yeukhon/hello)”

`

We are going to see something like this

`

{  
“cmd”: “hg clone [https://bitbucket.org/yeukhon/hello](https://bitbucket.org/yeukhon/hello)”,  
“invocation”: {  
…  
}  
},  
“warnings”: [  
“Consider using hg module rather than running hg”  
]  
}

`

Now git doesn’t have this problem because git is not listed in command.py 's “command” variable on [L117](https://github.com/ansible/ansible/blob/eb1214baad0cbe2c4b7304caebb9ae1c7dc0d8db/lib/ansible/modules/commands/command.py#L117)

`  
commands = { ‘hg’: ‘hg’, ‘curl’: ‘get\_url or uri’, ‘wget’: ‘get\_url or uri’, ‘svn’: ‘subversion’, ‘service’: ‘service’ … }

`

I can remove hg from the list, but what about svn? It sounds like we let author of the module to decide whether or not the module should be included. This warning exists to remind people they can look to the module list rather than using command.

We can’t just assume all modules should have this warning. For example, take aws\_s3 module, the name “aws\_s3” requires us to convert to “aws s3” in order for the warning to make sense. So we either remove this warning completely, or we spend time working through a complex code to determiner whether something exist as a binary on the machine.

My vote: remove this completely because (1) selective warning is bad, and (2) we don’t want Ansible to guess (for the latter proposal).

As a maintainer for the hg module, I am okay excluding hg from this list, so we should ask svn module owners as well.
