diff options
Diffstat (limited to 'system/service.py')
-rw-r--r-- | system/service.py | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/system/service.py b/system/service.py index c8781b1c..a71e6382 100644 --- a/system/service.py +++ b/system/service.py @@ -74,29 +74,51 @@ options: description: - Additional arguments provided on the command line aliases: [ 'args' ] + use: + description: + - The service module actually uses system specific modules, normally through auto detection, this setting can force a specific module. + - Normally it uses the value of the 'ansible_service_mgr' fact and falls back to the old 'service' module when none matching is found. + default: 'auto' + version_added: 2.2 ''' EXAMPLES = ''' # Example action to start service httpd, if not running -- service: name=httpd state=started +- service: + name: httpd + state: started # Example action to stop service httpd, if running -- service: name=httpd state=stopped +- service: + name: httpd + state: stopped # Example action to restart service httpd, in all cases -- service: name=httpd state=restarted +- service: + name: httpd + state: restarted # Example action to reload service httpd, in all cases -- service: name=httpd state=reloaded +- service: + name: httpd + state: reloaded # Example action to enable service httpd, and not touch the running state -- service: name=httpd enabled=yes +- service: + name: httpd + enabled: yes # Example action to start service foo, based on running process /usr/bin/foo -- service: name=foo pattern=/usr/bin/foo state=started +- service: + name: foo + pattern: /usr/bin/foo + state: started # Example action to restart network service for interface eth0 -- service: name=network state=restarted args=eth0 +- service: + name: network + state: restarted + args: eth0 ''' |