It's probably because your script /sgi/atx/src/atxBoxHWM.pl need some
environment variables set.
When you login and manually execute the command you are using a interactive
shell, when Ansible(or you) execute the command from remote you are using
non-interactive shell.
These two modes read different files so you environment is probably not
correct.
To read more about interactive and non-interactive shell search search for it
on the web or in this list. Ansible use "/bin/sh", but in the "man bash" search
for INVOCATION to read a more thorough explanation about the two.