Convert to reduced list of known types (#50010)

This commit is contained in:
Dag Wieers 2018-12-18 22:25:30 +01:00 committed by Jordan Borean
commit 05c6ff79f9
908 changed files with 4822 additions and 4821 deletions

View file

@ -103,17 +103,17 @@ RETURN = '''
name:
description: name of the adjusted inittab entry
returned: always
type: string
type: str
sample: startmyservice
msg:
description: action done with the inittab entry
returned: changed
type: string
type: str
sample: changed inittab entry startmyservice
changed:
description: whether the inittab changed or not
returned: always
type: boolean
type: bool
sample: true
'''

View file

@ -111,7 +111,7 @@ EXAMPLES = r'''
RETURN = r'''
msg:
type: string
type: str
description: A friendly message describing the task result.
returned: always
sample: Logical volume testlv created.

View file

@ -151,52 +151,52 @@ RETURN = '''
exclusive:
description: If the key has been forced to be exclusive or not.
returned: success
type: boolean
type: bool
sample: False
key:
description: The key that the module was running against.
returned: success
type: string
type: str
sample: https://github.com/user.keys
key_option:
description: Key options related to the key.
returned: success
type: string
type: str
sample: null
keyfile:
description: Path for authorized key file.
returned: success
type: string
type: str
sample: /home/user/.ssh/authorized_keys
manage_dir:
description: Whether this module managed the directory of the authorized key file.
returned: success
type: boolean
type: bool
sample: True
path:
description: Alternate path to the authorized_keys file
returned: success
type: string
type: str
sample: null
state:
description: Whether the given key (with the given key_options) should or should not be in the file
returned: success
type: string
type: str
sample: present
unique:
description: Whether the key is unique
returned: success
type: boolean
type: bool
sample: false
user:
description: The username on the remote host whose authorized_keys file will be modified
returned: success
type: string
type: str
sample: user
validate_certs:
description: This only applies if using a https url as the source of the keys. If set to C(no), the SSL certificates will not be validated.
returned: success
type: boolean
type: bool
sample: true
'''

View file

@ -111,37 +111,37 @@ RETURN = '''
name:
description: BE name
returned: always
type: string
type: str
sample: pre-upgrade
snapshot:
description: ZFS snapshot to create BE from
returned: always
type: string
type: str
sample: rpool/ROOT/oi-hipster@fresh
description:
description: BE description
returned: always
type: string
type: str
sample: Upgrade from 9.0 to 10.0
options:
description: BE additional options
returned: always
type: string
type: str
sample: compression=on
mountpoint:
description: BE mountpoint
returned: always
type: string
type: str
sample: /mnt/be
state:
description: state of the target
returned: always
type: string
type: str
sample: present
force:
description: if forced action is wanted
returned: always
type: boolean
type: bool
sample: False
'''

View file

@ -71,7 +71,7 @@ RETURN = """
value:
description: value associated with the requested key
returned: success, state was "read"
type: string
type: str
sample: "'Default'"
"""

View file

@ -66,17 +66,17 @@ RETURN = '''
key:
description: The key specified in the module parameters
returned: success
type: string
type: str
sample: /desktop/gnome/interface/font_name
value_type:
description: The type of the value that was changed
returned: success
type: string
type: str
sample: string
value:
description: The value of the preference key after executing the module
returned: success
type: string
type: str
sample: "Serif 12"
...
'''

View file

@ -65,7 +65,7 @@ RETURN = '''
dest:
description: destination file/path
returned: success
type: string
type: str
sample: "/etc/network/interfaces"
ifaces:
description: interfaces dictionary
@ -75,27 +75,27 @@ ifaces:
ifaces:
description: interface dictionary
returned: success
type: dictionary
type: dict
contains:
eth0:
description: Name of the interface
returned: success
type: dictionary
type: dict
contains:
address_family:
description: interface address family
returned: success
type: string
type: str
sample: "inet"
method:
description: interface method
returned: success
type: string
type: str
sample: "manual"
mtu:
description: other options, all values returned as strings
returned: success
type: string
type: str
sample: "1500"
pre-up:
description: list of C(pre-up) scripts

View file

@ -110,7 +110,7 @@ RETURN = '''
msg:
description: Output from stdout of keytool command after execution of given command.
returned: success
type: string
type: str
sample: "Module require existing keystore at keystore_path '/tmp/test/cacerts'"
rc:
@ -122,7 +122,7 @@ rc:
cmd:
description: Executed command to get action done
returned: success
type: string
type: str
sample: "keytool -importcert -noprompt -keystore"
'''

View file

@ -93,7 +93,7 @@ RETURN = '''
msg:
description: Output from stdout of keytool/openssl command after execution of given command or an error.
returned: changed and failure
type: string
type: str
sample: "Unable to find the current certificate fingerprint in ..."
rc:
@ -105,7 +105,7 @@ rc:
cmd:
description: Executed command to get action done
returned: changed and failure
type: string
type: str
sample: "openssl x509 -noout -in /tmp/cert.crt -fingerprint -sha1"
'''

View file

@ -1,6 +1,6 @@
#!/usr/bin/python
# Copyright(c) 2014, Matthew Vernon <mcv21@cam.ac.uk>
# Copyright: (c) 2014, Matthew Vernon <mcv21@cam.ac.uk>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
@ -75,16 +75,17 @@ EXAMPLES = '''
# state = absent|present (default: present)
import base64
import errno
import hashlib
import hmac
import os
import os.path
import tempfile
import errno
import re
import tempfile
from ansible.module_utils._text import to_bytes, to_native
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.file import FileLock
from ansible.module_utils._text import to_bytes, to_native
def enforce_state(module, params):

View file

@ -93,12 +93,12 @@ RETURN = '''
changed:
description: Return changed for mksysb actions as true or false.
returned: always
type: boolean
type: bool
version_added: 2.5
msg:
description: Return message regarding the action.
returned: always
type: string
type: str
version_added: 2.5
'''

View file

@ -109,27 +109,27 @@ RETURN = '''
name:
description: name used to find the service
returned: success
type: string
type: str
sample: "sshd"
service_path:
description: resolved path for the service
returned: success
type: string
type: str
sample: "/var/sv/sshd"
enabled:
description: whether the service is enabled at system bootstrap
returned: success
type: boolean
type: bool
sample: True
preset:
description: whether the enabled status reflects the one set in the relevant C(*.preset) file
returned: success
type: boolean
type: bool
sample: False
state:
description: service process run state, C(None) if the service is not loaded and will not be started
returned: if state option is used
type: string
type: str
sample: "reloaded"
status:
description: a dictionary with the key=value pairs returned by `system-control show-json` or C(None) if the service is not loaded
@ -188,7 +188,7 @@ status:
user:
description: whether the user-level service manager is called
returned: success
type: boolean
type: bool
sample: False
'''

View file

@ -70,7 +70,7 @@ EXAMPLES = '''
- osx_defaults:
domain: NSGlobalDomain
key: AppleMeasurementUnits
type: string
type: str
value: Centimeters
state: present
@ -83,7 +83,7 @@ EXAMPLES = '''
- osx_defaults:
key: AppleMeasurementUnits
type: string
type: str
value: Centimeters
- osx_defaults:

View file

@ -231,14 +231,14 @@ change_count:
version_added: 2.4
new_rule:
description: The changes to the rule. This was available in Ansible version 2.4 and 2.5. It was removed in 2.6.
type: string
type: str
sample: None None None sha512 shadow try_first_pass use_authtok
returned: success
version_added: 2.4
updated_rule_(n):
description: The rule(s) that was/were changed. This is only available in
Ansible version 2.4 and was removed in 2.5.
type: string
type: str
sample:
- password sufficient pam_unix.so sha512 shadow try_first_pass
use_authtok
@ -250,7 +250,7 @@ action:
insert_before_rule, insert_after_rule, args_present, args_absent,
absent. This was available in Ansible version 2.4 and removed in 2.8"
returned: always
type: string
type: str
sample: "update_rule"
version_added: 2.4
dest:
@ -258,13 +258,13 @@ dest:
- "Path to pam.d service that was changed. This is only available in
Ansible version 2.3 and was removed in 2.4."
returned: success
type: string
type: str
sample: "/etc/pam.d/system-auth"
backupdest:
description:
- "The file name of the backup file, if created."
returned: success
type: string
type: str
version_added: 2.6
...
'''

View file

@ -58,7 +58,7 @@ RETURN = '''
ping:
description: value provided with the data parameter
returned: success
type: string
type: str
sample: pong
'''

View file

@ -75,7 +75,7 @@ RETURN = r'''
rebooted:
description: true if the machine was rebooted
returned: always
type: boolean
type: bool
sample: true
elapsed:
description: The number of seconds that elapsed waiting for the system to be rebooted.

View file

@ -62,22 +62,22 @@ RETURN = '''
msg:
description: Messages that describe changes that were made
returned: always
type: string
type: str
sample: Config SELinux state changed from 'disabled' to 'permissive'
configfile:
description: Path to SELinux configuration file
returned: always
type: string
type: str
sample: /etc/selinux/config
policy:
description: Name of the SELinux policy
returned: always
type: string
type: str
sample: targeted
state:
description: SELinux mode
returned: always
type: string
type: str
sample: enforcing
reboot_required:
description: Whether or not an reboot is required for the changes to take effect

View file

@ -58,17 +58,17 @@ ansible_facts:
source:
description: Init system of the service. One of C(systemd), C(sysv), C(upstart).
returned: always
type: string
type: str
sample: sysv
state:
description: State of the service. Either C(running) or C(stopped).
returned: always
type: string
type: str
sample: running
name:
description: Name of the service.
returned: always
type: string
type: str
sample: arp-ethers.service
'''

View file

@ -282,7 +282,7 @@ append:
comment:
description: Comment section from passwd file, usually the user name
returned: When user exists
type: string
type: str
sample: Agent Smith
create_home:
description: Whether or not to create the home directory
@ -302,12 +302,12 @@ group:
groups:
description: List of groups of which the user is a member
returned: When C(groups) is not empty and C(state) is 'present'
type: string
type: str
sample: 'chrony,apache'
home:
description: "Path to user's home directory"
returned: When C(state) is 'present'
type: string
type: str
sample: '/home/asmith'
move_home:
description: Whether or not to move an existing home directory
@ -317,12 +317,12 @@ move_home:
name:
description: User account name
returned: always
type: string
type: str
sample: asmith
password:
description: Masked value of the password
returned: When C(state) is 'present' and C(password) is not empty
type: string
type: str
sample: 'NOT_LOGGING_PASSWORD'
remove:
description: Whether or not to remove the user account
@ -332,22 +332,22 @@ remove:
shell:
description: User login shell
returned: When C(state) is 'present'
type: string
type: str
sample: '/bin/bash'
ssh_fingerprint:
description: Fingerprint of generated SSH key
returned: When C(generate_ssh_key) is C(True)
type: string
type: str
sample: '2048 SHA256:aYNHYcyVm87Igh0IMEDMbvW0QDlRQfE0aJugp684ko8 ansible-generated on host (RSA)'
ssh_key_file:
description: Path to generated SSH public key file
returned: When C(generate_ssh_key) is C(True)
type: string
type: str
sample: /home/asmith/.ssh/id_rsa
ssh_public_key:
description: Generated SSH public key file
returned: When C(generate_ssh_key) is C(True)
type: string
type: str
sample: >
'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC95opt4SPEC06tOYsJQJIuN23BbLMGmYo8ysVZQc4h2DZE9ugbjWWGS1/pweUGjVstgzMkBEeBCByaEf/RJKNecKRPeGd2Bw9DCj/bn5Z6rGfNENKBmo
618mUJBvdlEgea96QGjOwSB7/gmonduC7gsWDMNcOdSE3wJMTim4lddiBx4RgC9yXsJ6Tkz9BHD73MXPpT5ETnse+A3fw3IGVSjaueVnlUyUmOBf7fzmZbhlFVXf2Zi2rFTXqvbdGHKkzpw1U8eB8xFPP7y
@ -355,12 +355,12 @@ ssh_public_key:
stderr:
description: Standard error from running commands
returned: When stderr is returned by a command that is run
type: string
type: str
sample: Group wheels does not exist
stdout:
description: Standard output from running commands
returned: When standard output is returned by the command that is run
type: string
type: str
sample:
system:
description: Whether or not the account is a system account

View file

@ -66,22 +66,22 @@ RETURN = '''
channel:
description: The channel specified in the module parameters
returned: success
type: string
type: str
sample: "xsettings"
property:
description: The property specified in the module parameters
returned: success
type: string
type: str
sample: "/Xft/DPI"
value_type:
description: The type of the value that was changed
returned: success
type: string
type: str
sample: "int"
value:
description: The value of the preference key after executing the module
returned: success
type: string
type: str
sample: "192"
...
'''