register module help

11 views
Skip to first unread message

Viju Venugopal

unread,
Nov 26, 2017, 10:10:52 PM11/26/17
to Ansible Project

– name: verify application/database processes are not running
shell: if ps -eaf | egrep ‘apache|http’|grep -v grep > /dev/null ;then echo ‘process_running’;else echo ‘process_not_running’;fi
ignore_errors: true
register: app_process_check

If i write something like above , How do i Check/Display what value “app_process_check” has got ?

Toshio Kuratomi

unread,
Nov 27, 2017, 12:49:24 AM11/27/17
to ansible...@googlegroups.com
The debug module will help with displaying it and the assert module may be what you want for checking (although there are many other ways to do the latter as well)

-toshio

--
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 ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/a7cdb02d-46ca-4db4-a46f-9a6080060f10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages