It seems that the multiple use of the pipe "|" is the issue.
How can I bypass this ?

Le mardi 24 mai 2016 12:50:11 UTC+2, fanvalt a écrit :
>
> 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/d6c0f074-fcdf-430b-b359-accdbc1397f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to