On 24 May 2016 at 11:50, fanvalt <[email protected]> wrote:
> 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

Aside Ansible you can probably simply your command. I think following
should work

ps -u {{ ansible_user }} | grep [d]ispatcher | grep {{ rep_user }}/{{
openhrname }}/bin

I wonder if the second grep is actual necessary.

Wawrzek
-- 
Dr  Wawrzyniec NiewodniczaƄski    or Wawrzek for short
  PhD in Quantum Chemistry  & MSc in Molecular Engineering
   WWW: http://wawrzek.name E-MAIL: [email protected]
      Linux User #177124

-- 
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/CAC7-vpDw1Qss9dzgAZ4Sau8LgX5z86%3D%2BcxXm%3D-dQ7Gs4m_ZM_Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to