error command not found in RHEL server and few are working

39 views
Skip to first unread message

anish kumar

unread,
Feb 4, 2023, 8:01:10 PM2/4/23
to Ansible Project
 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: groupInfo: command not found", "stderr_lines": ["/bin/sh: groupInf o: command not found"], "stdout": "", "stdout_lines": []}

Dick Visser

unread,
Feb 5, 2023, 8:28:41 AM2/5/23
to ansible...@googlegroups.com
Asking the same question will get you the same answer: use the correct spelling and capitalisation.

And it's all there in the error message. Please read that (really)



--
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/02604fb5-e88e-4a5e-8f64-3aef89333180n%40googlegroups.com.
--
Sent from Gmail Mobile

anish kumar

unread,
Feb 5, 2023, 8:58:16 AM2/5/23
to ansible...@googlegroups.com
I have tried with small keyword  but no luck as well as caps 

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/ODh8oO9lkco/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/CAF8BbLZOuoF7FsOSf1f9naGYJ2b4p8Tmx7oigX%2BdTkcfh87RUg%40mail.gmail.com.

Todd Lewis

unread,
Feb 5, 2023, 2:52:39 PM2/5/23
to Ansible Project
You say "Path is same set from putty as well as from shell module in ansible". Convince us. Run the following through putty and then again through the ansible.builtin.shell module.
   echo $PATH
   which groupinfo

Lee Thomas Stephen

unread,
Feb 6, 2023, 12:22:19 AM2/6/23
to ansible...@googlegroups.com
The error message says
"/bin/sh: grouplnfo: command not found"
I is capitalized in groupInfo.
@Dick Visser was trying to point that out I think.

--
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.

Nico Kadel-Garcia

unread,
Feb 6, 2023, 1:04:31 PM2/6/23
to ansible...@googlegroups.com
On Mon, Feb 6, 2023 at 12:22 AM Lee Thomas Stephen <lee....@gmail.com> wrote:
>
> The error message says
> "/bin/sh: grouplnfo: command not found"
> I is capitalized in groupInfo.
> @Dick Visser was trying to point that out I think.

There was a '%changelog" typo that only broke RHEL 8 based
compilation. Do a "git pull" and try it now.

Nico Kadel-Garcia
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAG7s96XuGH%3DQin0k%3DdO_3hx-2dpYKPZ4Xuptvi54DCJrvxJpwQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages