Ansible command module giving errors in playbook

0down votefavorite

I am creating a playbook to silently execute a installation package using Command module. But here I am getting playbook execution error. Below is my playbook sample.

Here my aim is to execute the myibm silent package only if the specified path is not present “/opt/IBM/myibm”. But here i am not able to run this play successfully, but the local manual command execution is success. so the issue with my playbook.

Ansible uses a 'batch login' by default, which might not source the
same files as an interactive one and not have the same PATH set, so
either use full path for installc or use the `environement:` keyword
to ensure the correct PATH is set.

Hello Brian,

Thanks for your valuable advise, i modifed my playbook with vars as the path of the installer as below and still have the error.

That does not modify the command task, so i expect it to keep giving
the same error.