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

return_common: Clean up parameter types (#52524)

This PR includes:
- Parameter types added
- Copyright format fixes
- Short license statement
This commit is contained in:
Dag Wieers 2019-02-19 21:50:11 +01:00 committed by Sandra McCann
parent 1d3eb0bafd
commit 2cb9d9da14

View file

@ -1,45 +1,32 @@
# Copyright (c) 2016 Ansible, Inc # -*- coding: utf-8 -*-
#
# This file is part of Ansible # Copyright: (c) 2016, Ansible, Inc
# # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# 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/>.
class ModuleDocFragment(object): class ModuleDocFragment(object):
# Standard documentation fragment # Standard documentation fragment
RETURN = ''' RETURN = r'''
changed: changed:
description: Whether the module affected changes on the target. description: Whether the module affected changes on the target.
returned: always returned: always
type: bool type: bool
sample: False sample: false
failed: failed:
description: Whether the module failed to execute. description: Whether the module failed to execute.
returned: always returned: always
type: bool type: bool
sample: True sample: true
msg: msg:
description: Human-readable message. description: Human-readable message.
returned: as needed returned: as needed
type: string type: str
sample: "all ok" sample: all ok
skipped: skipped:
description: Whether the module was skipped. description: Whether the module was skipped.
returned: always returned: always
type: bool type: bool
sample: False sample: false
results: results:
description: List of module results, description: List of module results,
returned: when using a loop. returned: when using a loop.
@ -48,6 +35,6 @@ results:
exception: exception:
description: Optional information from a handled error. description: Optional information from a handled error.
returned: on some errors returned: on some errors
type: string type: str
sample: 'Unknown error' sample: Unknown error
''' '''