# error command not found in RHEL server  and few are working

**URL:** <https://forum.ansible.com/t/error-command-not-found-in-rhel-server-and-few-are-working/37619>\
**Category:** Ansible Project\
**Tags:** rhel, awx\
**Created:** [February 4, 2023, 4:37am UTC](https://forum.ansible.com/t/error-command-not-found-in-rhel-server-and-few-are-working/37619 "2023-02-04T04:37:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anish\_kumar2](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@anish\_kumar2](https://forum.ansible.com/u/anish_kumar2)\
**Post date:** [February 4, 2023, 4:37am UTC](https://forum.ansible.com/t/error-command-not-found-in-rhel-server-and-few-are-working/37619/1 "2023-02-04T04:37:57Z")

</div>

I am running the ansible playbook through AWX and its getting failed with the subjected error. I am able to run shell command on RHEL 7 from putty and its executed successfully. Few of the command from shell module i am able to run successfull same command is not running from ansible shell module  
Path is same set from putty as well as from shell module in ansible  
red hat RHEL 7.9

command :- pwd  
run from putty as well as shell moduel from ansible  
command :- groupinfo  
run from putty but getting error from ansible shell module when path and env is set

fatal: [localhost → 192.168.0.101]: FAILED! =\> {“changed”: t rue, “cmd”: “groupInfo”, “delta”: “0:00:00.082693”, “end”: “2023 -02-03 22:14:37.486677”, “msg”: “non-zero return code”, “rc”: 12 7, “start”: “2023-02-03 22:14:37.403984”, “stderr”: “/bin/sh: gr oupInfo: command not found”, “stderr\_lines”: [“/bin/sh: groupInf o: command not found”], “stdout”: “”, “stdout\_lines”: }

---

<div class="post-metadata">

**Author:** ![dnmvisser](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dnmvisser](https://forum.ansible.com/u/dnmvisser)\
**Post date:** [February 4, 2023, 6:56am UTC](https://forum.ansible.com/t/error-command-not-found-in-rhel-server-and-few-are-working/37619/2 "2023-02-04T06:56:53Z")

</div>

> I am running the ansible playbook through AWX and its getting failed with the subjected error. I am able to run shell command on RHEL 7 from putty and its executed successfully. Few of the command from shell module i am able to run successfull same command is not running from ansible shell module  
> Path is same set from putty as well as from shell module in ansible  
> red hat RHEL 7.9
> 
> command :- pwd  
> run from putty as well as shell moduel from ansible  
> command :- groupinfo

> run from putty but getting error from ansible shell module when path and env is set

Not really, see below

> fatal: [localhost → 192.168.0.101]: FAILED! =\> {“changed”: t rue, “cmd”: “groupInfo”, “delta”: “0:00:00.082693”, “end”: “2023 -02-03 22:14:37.486677”, “msg”: “non-zero return code”, “rc”: 12 7, “start”: “2023-02-03 22:14:37.403984”, “stderr”: “/bin/sh: gr oupInfo: command not found”, “stderr\_lines”: [“/bin/sh: groupInf o: command not found”], “stdout”: “”, “stdout\_lines”: }

You misspelled the command

---

<div class="post-metadata">

**Author:** ![anish\_kumar2](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@anish\_kumar2](https://forum.ansible.com/u/anish_kumar2)\
**Post date:** [February 5, 2023, 1:01am UTC](https://forum.ansible.com/t/error-command-not-found-in-rhel-server-and-few-are-working/37619/3 "2023-02-05T01:01:40Z")

</div>

> spelling mistake groupinfo to groupInfo . correcting the same. Please suggest me

---

<div class="post-metadata">

**Author:** ![dnmvisser](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dnmvisser](https://forum.ansible.com/u/dnmvisser)\
**Post date:** [February 5, 2023, 1:25pm UTC](https://forum.ansible.com/t/error-command-not-found-in-rhel-server-and-few-are-working/37619/4 "2023-02-05T13:25:42Z")

</div>

use all lowercase
