Fix parameter types and other fixes (#50111)

* Fix parameter types and other fixes

* Fix issues after review

* Fix Windows-references in system/files modules

This PR includes:
- Replacing version/v with just Ansible X.Y
- Removing Windows-alternatives from notes

* Update lib/ansible/modules/system/parted.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/system/service.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/system/service.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Revert type change, move to separate PR

* Update lib/ansible/modules/files/replace.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/files/replace.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/files/replace.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/files/replace.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/files/replace.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/files/replace.py

Co-Authored-By: dagwieers <dag@wieers.com>
This commit is contained in:
Dag Wieers 2019-01-18 03:24:47 +01:00 committed by GitHub
parent b834b29e43
commit 30227ace98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
43 changed files with 1222 additions and 1065 deletions

View file

@ -11,7 +11,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
DOCUMENTATION = '''
DOCUMENTATION = r'''
---
module: timezone
short_description: Configure timezone setting
@ -21,26 +21,28 @@ description:
- Several different tools are used depending on the OS/Distribution involved.
For Linux it can use C(timedatectl) or edit C(/etc/sysconfig/clock) or C(/etc/timezone) and C(hwclock).
On SmartOS, C(sm-set-timezone), for macOS, C(systemsetup), for BSD, C(/etc/localtime) is modified.
- As of version 2.3 support was added for SmartOS and BSDs.
- As of version 2.4 support was added for macOS.
- As of Ansible 2.3 support was added for SmartOS and BSDs.
- As of Ansible 2.4 support was added for macOS.
- Windows, AIX and HPUX are not supported, please let us know if you find any other OS/distro in which this fails.
version_added: "2.2"
options:
name:
description:
- Name of the timezone for the system clock.
Default is to keep current setting. B(At least one of name and
hwclock are required.)
- Default is to keep current setting.
- B(At least one of name and hwclock are required.)
type: str
hwclock:
description:
- Whether the hardware clock is in UTC or in local timezone.
Default is to keep current setting.
Note that this option is recommended not to change and may fail
- Default is to keep current setting.
- Note that this option is recommended not to change and may fail
to configure, especially on virtual environments such as AWS.
B(At least one of name and hwclock are required.)
I(Only used on Linux.)
- B(At least one of name and hwclock are required.)
- I(Only used on Linux.)
type: str
aliases: [ rtc ]
choices: [ "UTC", "local" ]
choices: [ local, UTC ]
notes:
- On SmartOS the C(sm-set-timezone) utility (part of the smtools package) is required to set the zone timezone
author:
@ -49,7 +51,7 @@ author:
- Indrajit Raychaudhuri (@indrajitr)
'''
RETURN = '''
RETURN = r'''
diff:
description: The differences about the given arguments.
returned: success
@ -63,8 +65,8 @@ diff:
type: dict
'''
EXAMPLES = '''
- name: set timezone to Asia/Tokyo
EXAMPLES = r'''
- name: Set timezone to Asia/Tokyo
timezone:
name: Asia/Tokyo
'''