New in version 1.7.
Manages Windows services
parameter | required | default | choices | comments |
---|---|---|---|---|
name | yes | Name of the service |
||
start_mode | no |
| Set the startup type for the service |
|
state | no |
| started /stopped are idempotent actions that will not run commands unless necessary. restarted will always bounce the service. |
# Restart a service win_service: name: spooler state: restarted # Set service startup mode to auto and ensure it is started win_service: name: spooler start_mode: auto state: started
For more information on what this means please read Core Modules
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, developing_test_pr and Developing Modules.
© 2012–2016 Michael DeHaan
© 2016 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/win_service_module.html