July 2017
Intermediate to advanced
266 pages
6h 36m
English
Managing services using Ansible is a breeze. Service management can be a complex operation and is usually highly dependent on the OS and system type. However, with Ansible's service module, we can easily stop, start, and restart services. This integration provides a high level of reliability and abstracts the fundamental OS-level operations that must be performed. Let's take a look at the Ansible service module and see its capabilities:
# Example action to start service httpd, if not running- service: name: httpd state: started# Example action to stop service httpd, if running- service: name: httpd state: stopped# Example action to restart service httpd, in all cases- service: name: httpd state: restarted# Example ...
Read now
Unlock full access