mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-09 18:04:02 -07:00
win_reg_stat change the module parameters for standardisation (#22732)
This commit is contained in:
parent
89b78cb5e8
commit
f1ab879bb6
3 changed files with 175 additions and 189 deletions
|
@ -36,86 +36,81 @@ description:
|
|||
- It also returns the sub keys and properties of the key specified.
|
||||
- If specifying a property name through I(property), it will return the information specific for that property.
|
||||
options:
|
||||
key:
|
||||
description:
|
||||
- The full registry key path including the hive to search for.
|
||||
required: true
|
||||
property:
|
||||
description:
|
||||
- The registry property name to get information for, the return json will not include the sub_keys and properties entries for the I(key) specified.
|
||||
required: false
|
||||
|
||||
path:
|
||||
description: The full registry key path including the hive to search for.
|
||||
required: true
|
||||
aliases: [ key ]
|
||||
name:
|
||||
description:
|
||||
- The registry property name to get information for, the return json will not include the sub_keys and properties entries for the I(key) specified.
|
||||
required: false
|
||||
aliases: [ entry, value, property ]
|
||||
author: "Jordan Borean (@jborean93)"
|
||||
'''
|
||||
|
||||
EXAMPLES = r'''
|
||||
# Obtain information about a registry key using short form
|
||||
- win_reg_stat:
|
||||
key: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion
|
||||
path: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion
|
||||
register: current_version
|
||||
|
||||
# Obtain information about a registry key property
|
||||
- win_reg_stat:
|
||||
key: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion
|
||||
property: CommonFilesDir
|
||||
path: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion
|
||||
name: CommonFilesDir
|
||||
register: common_files_dir
|
||||
'''
|
||||
|
||||
RETURN = r'''
|
||||
changed:
|
||||
description: Whether anything was changed.
|
||||
returned: always
|
||||
type: boolean
|
||||
sample: True
|
||||
win_reg_stat:
|
||||
description: Information about the registry key or property specified.
|
||||
returned: success
|
||||
type: dictionary
|
||||
contains:
|
||||
exists:
|
||||
description: States whether the registry key/property exists.
|
||||
returned: success and path/property exists
|
||||
type: boolean
|
||||
sample: True
|
||||
properties:
|
||||
description: A list of all the properties and their values in the key.
|
||||
returned: success, path exists and property not specified
|
||||
type: list
|
||||
sample: [
|
||||
"binary_property" : {
|
||||
"raw_value": ["0x01", "0x16"],
|
||||
"type": "REG_BINARY",
|
||||
"value": [1, 22]
|
||||
},
|
||||
"multi_string_property" : {
|
||||
"raw_value": ["a", "b"],
|
||||
"type": "REG_MULTI_SZ",
|
||||
"value": ["a", "b"]
|
||||
}
|
||||
]
|
||||
sub_keys:
|
||||
description: A list of all the sub keys of the key specified.
|
||||
returned: success, path exists and property not specified
|
||||
type: list
|
||||
sample: [
|
||||
"AppHost",
|
||||
"Casting",
|
||||
"DateTime"
|
||||
]
|
||||
raw_value:
|
||||
description: Returns the raw value of the registry property, REG_EXPAND_SZ has no string expansion, REG_BINARY or REG_NONE is in hex 0x format.
|
||||
REG_NONE, this value is a hex string in the 0x format.
|
||||
returned: success, path/property exists and property specified
|
||||
type: string
|
||||
sample: '%ProgramDir%\\Common Files'
|
||||
type:
|
||||
description: The property type.
|
||||
returned: success, path/property exists and property specified
|
||||
type: string
|
||||
sample: "REG_EXPAND_SZ"
|
||||
value:
|
||||
description: The value of the property.
|
||||
returned: success, path/property exists and property specified
|
||||
type: string
|
||||
sample: 'C:\\Program Files\\Common Files'
|
||||
description: Whether anything was changed.
|
||||
returned: always
|
||||
type: boolean
|
||||
sample: True
|
||||
exists:
|
||||
description: States whether the registry key/property exists.
|
||||
returned: success and path/property exists
|
||||
type: boolean
|
||||
sample: True
|
||||
properties:
|
||||
description: A list of all the properties and their values in the key.
|
||||
returned: success, path exists and property not specified
|
||||
type: list
|
||||
sample: [
|
||||
"binary_property" : {
|
||||
"raw_value": ["0x01", "0x16"],
|
||||
"type": "REG_BINARY",
|
||||
"value": [1, 22]
|
||||
},
|
||||
"multi_string_property" : {
|
||||
"raw_value": ["a", "b"],
|
||||
"type": "REG_MULTI_SZ",
|
||||
"value": ["a", "b"]
|
||||
}
|
||||
]
|
||||
sub_keys:
|
||||
description: A list of all the sub keys of the key specified.
|
||||
returned: success, path exists and property not specified
|
||||
type: list
|
||||
sample: [
|
||||
"AppHost",
|
||||
"Casting",
|
||||
"DateTime"
|
||||
]
|
||||
raw_value:
|
||||
description: Returns the raw value of the registry property, REG_EXPAND_SZ has no string expansion, REG_BINARY or REG_NONE is in hex 0x format.
|
||||
REG_NONE, this value is a hex string in the 0x format.
|
||||
returned: success, path/property exists and property specified
|
||||
type: string
|
||||
sample: '%ProgramDir%\\Common Files'
|
||||
type:
|
||||
description: The property type.
|
||||
returned: success, path/property exists and property specified
|
||||
type: string
|
||||
sample: "REG_EXPAND_SZ"
|
||||
value:
|
||||
description: The value of the property.
|
||||
returned: success, path/property exists and property specified
|
||||
type: string
|
||||
sample: 'C:\\Program Files\\Common Files'
|
||||
'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue