service module in ansible code example
Example: service module ansible
- name: Start service httpd, if not running
service:
name: httpd
state: started
- name: Start service httpd, if not running
service:
name: httpd
state: started