# Command module usage

**URL:** <https://forum.ansible.com/t/command-module-usage/35532>\
**Category:** Ansible Project\
**Created:** [July 21, 2021, 7:46am UTC](https://forum.ansible.com/t/command-module-usage/35532 "2021-07-21T07:46:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nitesh\_shet](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@nitesh\_shet](https://forum.ansible.com/u/nitesh_shet)\
**Post date:** [July 21, 2021, 7:46am UTC](https://forum.ansible.com/t/command-module-usage/35532/1 "2021-07-21T07:46:01Z")

</div>

Hi,  
i am using command module in my playbook where i generally want a uptime of my remote machine but whenever i run the playbook i am getting my control machine uptime for the remote hosts.

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [July 21, 2021, 8:00am UTC](https://forum.ansible.com/t/command-module-usage/35532/2 "2021-07-21T08:00:45Z")

</div>

If you add other tasks to this play, do they also run on the control machine?

also, what does your inventory look like?

And take a look at "ansible-config dump --only-changed" to see if  
something is off there

---

<div class="post-metadata">

**Author:** ![nitesh\_shet](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@nitesh\_shet](https://forum.ansible.com/u/nitesh_shet)\
**Post date:** [July 21, 2021, 8:22am UTC](https://forum.ansible.com/t/command-module-usage/35532/3 "2021-07-21T08:22:07Z")

</div>

DEFAULT\_LOG\_PATH(/etc/ansible/ansible.cfg) = /home/nshet/ansible.log  
DEFAULT\_STDOUT\_CALLBACK(/etc/ansible/ansible.cfg) = yaml  
HOST\_KEY\_CHECKING(/etc/ansible/ansible.cfg) = False  
these are the changes in config file and in my inventory i had written connection as network\_cli and there is no change as such apart from host name user name and password

---

<div class="post-metadata">

**Author:** ![nitesh\_shet](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@nitesh\_shet](https://forum.ansible.com/u/nitesh_shet)\
**Post date:** [July 21, 2021, 8:22am UTC](https://forum.ansible.com/t/command-module-usage/35532/4 "2021-07-21T08:22:53Z")

</div>

yeah for the File module aso i am seeing the same , the file is getting created in to control machine only

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [July 21, 2021, 1:50pm UTC](https://forum.ansible.com/t/command-module-usage/35532/5 "2021-07-21T13:50:32Z")

</div>

that network\_cli is probably the culprit.  
Your servers are \*not\* network devices.  
Remove that and check again.
