Hi Ansible Experts!


I use ansible 2.4.2.0 on linux Centos


I have one problem  when I want to run a shell program on remote host in 
background

I have a shell program* ControllerAgent* like that :


[root@157501lepca02 bin]# pwd
/home/neoload69/bin
[root@157501lepca02 bin]# ls -l
total 320
-rwxr-xr-x 1 root     root     13698  7 mars  09:04* ControllerAgent*
...

If I run manually  my shell program ControllerAgent as following :

[root@157501lepca02 bin]# nohup /home/neoload69/bin/ControllerAgent 
</dev/null >/dev/null 2>&1 &
[1] 10147
[root@157501lepca02 bin]#

it works well


But when I want to run my shell program ControllerAgent in a ansible 
playbook as following :


- hosts: [xx.yyy.tt.xxx]
  become: yes
  remote_user: deploy75
...

- name: Starting  Controller Agent
  shell: sh nohup /home/neoload69/bin/ControllerAgent </dev/null >/dev/null 
2>&1 &

...

Nothing  happens, it means that no process of my shell program 
ControllerAgent is created 

Do you have an idea of the problem to help me ?

Thanks a lots

Best regards

Viet 

NB : the remote user deploy75 is in the visudo file of the remote machine 
xx.yyy.tt.xxx like 

## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
deploy75 ALL=(ALL) ALL







-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/263be6da-2d19-4647-b421-df850ea966a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to