Have you verified that you have sufficient privs on the remote machine.
You may want to review this link
http://docs.ansible.com/ansible/command_module.html
Bob Aiello, Technical Editor
Hello ,
I am new to Ansible and trying to setup for automating deployment process .
I have written a simple playbook to execute a shell script ( at remote host) on remote host using command module .
=============================================
---
- name: start server.
hosts: app
remote_user: app
tasks:
- name: Start APP Service
command: /home/app/current-app/etas/util_bin/start_app
register: comm_out
- debug: msg="{{ comm_out.stdout }}"
- debug: msg="{{ comm_out.stderr }}"
==============================================
But it seems that its not able to load the libraries on remote host and fails to start the application process , however the ansible-playbook command line exist with success status .
Error :
===================
/home/app/current-app/etas/bin/eta_registry: error while loading shared libraries: libapp_r64.so.1: cannot open shared object file: No such file or directory\n/home/app/current-app/etas/bin/eta_log_manager: error while loading shared libraries: libapp_r64.so.1: cannot open shared object file: No such file or directory\
======================
Please help on this .
Thanks in Advance!!
Have you verified that you have sufficient privs on the remote machine.
You may want to review this link
http://docs.ansible.com/ansible/command_module.html
Bob Aiello, Technical Editor
Verify that your user has the correct path to libraries to run the application and the necessary environmental variables.
The reason that your ansible script show success despite the fact that the application didn't start is that the shell script that is being exited with a result == 0. Ansible just report pass/fail based on the exit status of the command - unless you tell it otherwise.