sorry. I take it back my words

the following change is working

when: htop_is_running.stdout == '0'

Thanks




On Friday, October 1, 2021 at 8:05:29 AM UTC-4 [email protected] wrote:

> On 01/10/2021 14:53, Sandip Bhattacharya wrote:
> > 
> > 
> > On 01.10.21 02:10, subbamma natla wrote:
> >> can somebody explaine me why service sis not starting
> >>
> >> on mhost1:
> >> [root@mhost1 ~]#  ps -ef | grep -v grep | grep httpd
> > 
> > It might be cleaner to use pgrep instead for process check. Then you can 
> use something like this:
> > 
> >   tasks:
> >     - name: Process check
> >       command: pgrep httpd
> >       register: httpd_check
> >       ignore_errors: true
> >     - debug:
> >         var: httpd_check.failed
> > 
> >     - name: restart httpd if down
> >       systemd:
> >         name: httpd
> >         state: restarted
> >       when: httpd_check.failed
> > 
> > 
>
> What's wrong with asserting that the service should be started?
>
> - systemd:
> name: httpd
> state: started
>
> Regards
> Racke
>
> -- 
> Ecommerce and Linux consulting + Perl and web application programming.
> Debian and Sympa administration.
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/31d5f8c3-931c-491c-83d3-9567c0bf7456n%40googlegroups.com.

Reply via email to