Ansible: How to get service status by Ansible?


I want to get service like redis-server running status by Ansible.

I know how to use Ansible service module to stop or start system service. But how can I get the current service status?


Use command module with service redis-server status and parse stdout.
Or use patched service module.

Leave a Reply