service - Manage services — Ansible Documentation
docs.ansible.com › ansible › 2Dec 01, 2020 · -name: Start service httpd, if not running service: name: httpd state: started-name: Stop service httpd, if running service: name: httpd state: stopped-name: Restart service httpd, in all cases service: name: httpd state: restarted-name: Reload service httpd, in all cases service: name: httpd state: reloaded-name: Enable service httpd, and not touch the running state service: name: httpd enabled: yes-name: Start service foo, based on running process /usr/bin/foo service: name: foo pattern ...