Hello,

I want to check if a process to run on my server by using the ps command:
- name: Test if openhr runs
  shell: ps -ef | grep -v grep  | grep {{ ansible_user }} | grep dispatcher 
| grep {{ rep_user }}/{{ openhrname }}/bin
  register: procopenhr

I receive the following error message, I cannot figure out what's wrong 
with my command:

TASK [openhr : Test if openhr runs] 
******************************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "ps -ef | grep -v 
grep | grep fval | grep dispatcher | grep home/fval/openhr/bin", "delta": 
"0:00:00.011877", "end": "2016-05-24 12:36:58.184606", "failed": true, 
"rc": 1, "start": "2016-05-24 12:36:58.172729", "stderr": "", "stdout": "", 
"stdout_lines": [], "warnings": []}

I tried with quoting the last grep, without success: "grep {{ rep_user 
}}/{{ openhrname }}/bin"

What is wrong ?

Regards


-- 
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/a0d25dac-3834-4e5a-8624-2d0c1afc5915%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to