1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix typos and docs

This commit is contained in:
Dag Wieers 2017-10-30 00:37:06 +01:00 committed by GitHub
parent 08d81b970d
commit a4e077b357
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,38 +1,20 @@
#!/usr/bin/python #!/usr/bin/python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# (c) 2014, Chris Hoffman <choffman@chathamfinancial.com> # Copyright: (c) 2014, Chris Hoffman <choffman@chathamfinancial.com>
# # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# this is a windows documentation stub. actual code lives in the .ps1
# file of the same name
ANSIBLE_METADATA = {'metadata_version': '1.1', ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'], 'status': ['stableinterface'],
'supported_by': 'core'} 'supported_by': 'core'}
DOCUMENTATION = r''' DOCUMENTATION = r'''
--- ---
module: win_service module: win_service
version_added: "1.7" version_added: "1.7"
short_description: Manages and gets info about Windows services short_description: Manage and query Windows services
description: description:
- Manages and gets info about Windows services. - Manage and query Windows services.
- For non-Windows targets, use the M(service) module instead. - For non-Windows targets, use the M(service) module instead.
options: options:
dependencies: dependencies:
@ -60,7 +42,8 @@ options:
description: description:
- Whether to allow the service user to interact with the desktop. - Whether to allow the service user to interact with the desktop.
- This should only be set to true when using the LocalSystem username. - This should only be set to true when using the LocalSystem username.
default: False type: bool
default: 'no'
version_added: "2.3" version_added: "2.3"
description: description:
description: description:
@ -72,16 +55,17 @@ options:
version_added: "2.3" version_added: "2.3"
force_dependent_services: force_dependent_services:
description: description:
- If True, stopping or restarting a service with dependent services will - If C(yes), stopping or restarting a service with dependent services will
force the dependent services to stop or restart also. force the dependent services to stop or restart also.
- If False, stopping or restarting a service with dependent services may - If C(no), stopping or restarting a service with dependent services may
fail. fail.
default: False type: bool
default: 'no'
version_added: "2.3" version_added: "2.3"
name: name:
description: description:
- Name of the service - Name of the service.
- If only the name pararameter is specified, the module will report - If only the name parameter is specified, the module will report
on whether the service exists or not without making any changes. on whether the service exists or not without making any changes.
required: true required: true
path: path:
@ -127,7 +111,8 @@ options:
version_added: "2.3" version_added: "2.3"
notes: notes:
- For non-Windows targets, use the M(service) module instead. - For non-Windows targets, use the M(service) module instead.
author: "Chris Hoffman (@chrishoffman)" author:
- Chris Hoffman (@chrishoffman)
''' '''
EXAMPLES = r''' EXAMPLES = r'''
@ -142,7 +127,7 @@ EXAMPLES = r'''
start_mode: auto start_mode: auto
state: started state: started
- name: pause a service - name: Pause a service
win_service: win_service:
name: Netlogon name: Netlogon
state: paused state: paused
@ -151,50 +136,50 @@ EXAMPLES = r'''
# - username: LocalSystem # - username: LocalSystem
# - state: stopped # - state: stopped
# - start_mode: auto # - start_mode: auto
- name: create a new service - name: Create a new service
win_service: win_service:
name: service name name: service name
path: C:\temp\test.exe path: C:\temp\test.exe
- name: create a new service with extra details - name: Create a new service with extra details
win_service: win_service:
name: service name name: service name
path: C:\temp\test.exe path: C:\temp\test.exe
display_name: Service Name display_name: Service Name
description: A test service description description: A test service description
- name: remove a service - name: Remove a service
win_service: win_service:
name: service name name: service name
state: absent state: absent
- name: check if a service is installed - name: Check if a service is installed
win_service: win_service:
name: service name name: service name
register: service_info register: service_info
- name: set the log on user to a domain account - name: Set the log on user to a domain account
win_service: win_service:
name: service name name: service name
state: restarted state: restarted
username: DOMAIN\User username: DOMAIN\User
password: Password password: Password
- name: set the log on user to a local account - name: Set the log on user to a local account
win_service: win_service:
name: service name name: service name
state: restarted state: restarted
username: .\Administrator username: .\Administrator
password: Password password: Password
- name: set the log on user to Local System - name: Set the log on user to Local System
win_service: win_service:
name: service name name: service name
state: restarted state: restarted
username: LocalSystem username: LocalSystem
password: "" password: ""
- name: set the log on user to Local System and allow it to interact with the desktop - name: Set the log on user to Local System and allow it to interact with the desktop
win_service: win_service:
name: service name name: service name
state: restarted state: restarted
@ -202,32 +187,32 @@ EXAMPLES = r'''
password: "" password: ""
desktop_interact: True desktop_interact: True
- name: set the log on user to Network Service - name: Set the log on user to Network Service
win_service: win_service:
name: service name name: service name
state: restarted state: restarted
username: NT AUTHORITY\NetworkService username: NT AUTHORITY\NetworkService
password: "" password: ""
- name: set the log on user to Local Service - name: Set the log on user to Local Service
win_service: win_service:
name: service name name: service name
state: restarted state: restarted
username: NT AUTHORITY\LocalService username: NT AUTHORITY\LocalService
password: "" password: ""
- name: set dependencies to ones only in the list - name: Set dependencies to ones only in the list
win_service: win_service:
name: service name name: service name
dependencies: ['service1', 'service2'] dependencies: ['service1', 'service2']
- name: add dependencies to existing dependencies - name: Add dependencies to existing dependencies
win_service: win_service:
name: service name name: service name
dependencies: ['service1', 'service2'] dependencies: ['service1', 'service2']
dependency_action: add dependency_action: add
- name: remove dependencies from existing dependencies - name: Remove dependencies from existing dependencies
win_service: win_service:
name: service name name: service name
dependencies: ['service1', 'service2'] dependencies: ['service1', 'service2']