error command not found in RHEL server and few are working

13 views
Skip to first unread message

anish kumar

unread,
Feb 3, 2023, 11:37:57 PM2/3/23
to Ansible Project
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": []}

Dick Visser

unread,
Feb 4, 2023, 1:57:15 AM2/4/23
to ansible...@googlegroups.com
On Sat, 4 Feb 2023 at 05:38, anish kumar <anish...@gmail.com> wrote:
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


--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/513c544f-6111-4019-a2c8-d579fb3be784n%40googlegroups.com.
--
Sent from Gmail Mobile

anish kumar

unread,
Feb 4, 2023, 8:02:09 PM2/4/23
to ansible...@googlegroups.com
spelling mistake groupinfo to groupInfo . correcting the same. Please suggest me 

You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/mbPVGK9faRE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAF8BbLbmL1zxk4kPZ4H3f%3D_6yTOCVBwwj9KPT33aSCYO1t5n3A%40mail.gmail.com.

Dick Visser

unread,
Feb 5, 2023, 8:26:05 AM2/5/23
to ansible...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages