doc style adjustments: modules x*

This commit is contained in:
Alexei Znamensky 2025-07-27 17:28:40 +12:00
commit 2ef9930ce7
4 changed files with 168 additions and 158 deletions

View file

@ -273,33 +273,34 @@ redfish_facts:
description: Resource content. description: Resource content.
returned: when command == GetResource or command == GetCollectionResource returned: when command == GetResource or command == GetCollectionResource
type: dict type: dict
sample: '{ sample:
"redfish_facts": { {
"data": { "redfish_facts": {
"@odata.etag": "\"3179bf00d69f25a8b3c\"", "data": {
"@odata.id": "/redfish/v1/Managers/1/NetworkProtocol/Oem/Lenovo/DNS", "@odata.etag": "\"3179bf00d69f25a8b3c\"",
"@odata.type": "#LenovoDNS.v1_0_0.LenovoDNS", "@odata.id": "/redfish/v1/Managers/1/NetworkProtocol/Oem/Lenovo/DNS",
"DDNS": [ "@odata.type": "#LenovoDNS.v1_0_0.LenovoDNS",
{ "DDNS": [
"DDNSEnable": true, {
"DomainName": "", "DDNSEnable": true,
"DomainNameSource": "DHCP" "DomainName": "",
} "DomainNameSource": "DHCP"
], }
"DNSEnable": true, ],
"Description": "This resource is used to represent a DNS resource for a Redfish implementation.", "DNSEnable": true,
"IPv4Address1": "10.103.62.178", "Description": "This resource is used to represent a DNS resource for a Redfish implementation.",
"IPv4Address2": "0.0.0.0", "IPv4Address1": "10.103.62.178",
"IPv4Address3": "0.0.0.0", "IPv4Address2": "0.0.0.0",
"IPv6Address1": "::", "IPv4Address3": "0.0.0.0",
"IPv6Address2": "::", "IPv6Address1": "::",
"IPv6Address3": "::", "IPv6Address2": "::",
"Id": "LenovoDNS", "IPv6Address3": "::",
"PreferredAddresstype": "IPv4" "Id": "LenovoDNS",
}, "PreferredAddresstype": "IPv4"
"ret": true },
"ret": true
}
} }
}'
""" """
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule

View file

@ -31,16 +31,15 @@ attributes:
options: options:
mime_types: mime_types:
description: description:
- One or more MIME types for which a default handler will be set. - One or more MIME types for which a default handler is set.
type: list type: list
elements: str elements: str
required: true required: true
handler: handler:
description: description:
- Sets the default handler for the specified MIME types. - Sets the default handler for the specified MIME types.
- The desktop file must be installed in the system. - The desktop file must be installed in the system. If the desktop file is not installed, the module does not fail,
If the desktop file is not installed, the module but the handler is not set either.
does not fail, but the handler is not set either.
- You must pass a handler in the form V(*.desktop), otherwise the module fails. - You must pass a handler in the form V(*.desktop), otherwise the module fails.
type: str type: str
required: true required: true

View file

@ -394,141 +394,143 @@ instance:
description: Metadata about the VM. description: Metadata about the VM.
returned: always returned: always
type: dict type: dict
sample: { sample:
"cdrom": { {
"type": "none" "cdrom": {
}, "type": "none"
"customization_agent": "native",
"disks": [
{
"name": "testvm_11-0",
"name_desc": "",
"os_device": "xvda",
"size": 42949672960,
"sr": "Local storage",
"sr_uuid": "0af1245e-bdb0-ba33-1446-57a962ec4075",
"vbd_userdevice": "0"
}, },
{ "customization_agent": "native",
"name": "testvm_11-1", "disks": [
"name_desc": "", {
"os_device": "xvdb", "name": "testvm_11-0",
"size": 42949672960, "name_desc": "",
"sr": "Local storage", "os_device": "xvda",
"sr_uuid": "0af1245e-bdb0-ba33-1446-57a962ec4075", "size": 42949672960,
"vbd_userdevice": "1" "sr": "Local storage",
"sr_uuid": "0af1245e-bdb0-ba33-1446-57a962ec4075",
"vbd_userdevice": "0"
},
{
"name": "testvm_11-1",
"name_desc": "",
"os_device": "xvdb",
"size": 42949672960,
"sr": "Local storage",
"sr_uuid": "0af1245e-bdb0-ba33-1446-57a962ec4075",
"vbd_userdevice": "1"
}
],
"domid": "56",
"folder": "",
"hardware": {
"memory_mb": 8192,
"num_cpu_cores_per_socket": 2,
"num_cpus": 4
},
"home_server": "",
"is_template": false,
"name": "testvm_11",
"name_desc": "",
"networks": [
{
"gateway": "192.168.0.254",
"gateway6": "fc00::fffe",
"ip": "192.168.0.200",
"ip6": [
"fe80:0000:0000:0000:e9cb:625a:32c5:c291",
"fc00:0000:0000:0000:0000:0000:0000:0001"
],
"mac": "ba:91:3a:48:20:76",
"mtu": "1500",
"name": "Pool-wide network associated with eth1",
"netmask": "255.255.255.128",
"prefix": "25",
"prefix6": "64",
"vif_device": "0"
}
],
"other_config": {
"base_template_name": "Windows Server 2016 (64-bit)",
"import_task": "OpaqueRef:e43eb71c-45d6-5351-09ff-96e4fb7d0fa5",
"install-methods": "cdrom",
"instant": "true",
"mac_seed": "f83e8d8a-cfdc-b105-b054-ef5cb416b77e"
},
"platform": {
"acpi": "1",
"apic": "true",
"cores-per-socket": "2",
"device_id": "0002",
"hpet": "true",
"nx": "true",
"pae": "true",
"timeoffset": "-25200",
"vga": "std",
"videoram": "8",
"viridian": "true",
"viridian_reference_tsc": "true",
"viridian_time_ref_count": "true"
},
"state": "poweredon",
"uuid": "e3c0b2d5-5f05-424e-479c-d3df8b3e7cda",
"xenstore_data": {
"vm-data": ""
} }
],
"domid": "56",
"folder": "",
"hardware": {
"memory_mb": 8192,
"num_cpu_cores_per_socket": 2,
"num_cpus": 4
},
"home_server": "",
"is_template": false,
"name": "testvm_11",
"name_desc": "",
"networks": [
{
"gateway": "192.168.0.254",
"gateway6": "fc00::fffe",
"ip": "192.168.0.200",
"ip6": [
"fe80:0000:0000:0000:e9cb:625a:32c5:c291",
"fc00:0000:0000:0000:0000:0000:0000:0001"
],
"mac": "ba:91:3a:48:20:76",
"mtu": "1500",
"name": "Pool-wide network associated with eth1",
"netmask": "255.255.255.128",
"prefix": "25",
"prefix6": "64",
"vif_device": "0"
}
],
"other_config": {
"base_template_name": "Windows Server 2016 (64-bit)",
"import_task": "OpaqueRef:e43eb71c-45d6-5351-09ff-96e4fb7d0fa5",
"install-methods": "cdrom",
"instant": "true",
"mac_seed": "f83e8d8a-cfdc-b105-b054-ef5cb416b77e"
},
"platform": {
"acpi": "1",
"apic": "true",
"cores-per-socket": "2",
"device_id": "0002",
"hpet": "true",
"nx": "true",
"pae": "true",
"timeoffset": "-25200",
"vga": "std",
"videoram": "8",
"viridian": "true",
"viridian_reference_tsc": "true",
"viridian_time_ref_count": "true"
},
"state": "poweredon",
"uuid": "e3c0b2d5-5f05-424e-479c-d3df8b3e7cda",
"xenstore_data": {
"vm-data": ""
} }
}
changes: changes:
description: Detected or made changes to VM. description: Detected or made changes to VM.
returned: always returned: always
type: list type: list
sample: [ sample:
{ [
"hardware": [ {
"num_cpus" "hardware": [
] "num_cpus"
},
{
"disks_changed": [
[],
[
"size"
] ]
] },
}, {
{ "disks_changed": [
"disks_new": [ [],
{ [
"name": "new-disk", "size"
"name_desc": "", ]
"position": 2, ]
"size_gb": "4", },
"vbd_userdevice": "2" {
} "disks_new": [
] {
}, "name": "new-disk",
{ "name_desc": "",
"cdrom": [ "position": 2,
"type", "size_gb": "4",
"iso_name" "vbd_userdevice": "2"
] }
}, ]
{ },
"networks_changed": [ {
[ "cdrom": [
"mac" "type",
], "iso_name"
] ]
}, },
{ {
"networks_new": [ "networks_changed": [
{ [
"name": "Pool-wide network associated with eth2", "mac"
"position": 1, ]
"vif_device": "1" ]
} },
] {
}, "networks_new": [
"need_poweredoff" {
] "name": "Pool-wide network associated with eth2",
"position": 1,
"vif_device": "1"
}
]
},
"need_poweredoff"
]
""" """
import re import re

View file

@ -333,7 +333,15 @@ actions:
description: A dictionary with the original xpath, namespaces and state. description: A dictionary with the original xpath, namespaces and state.
type: dict type: dict
returned: success returned: success
sample: {xpath: xpath, namespaces: [namespace1, namespace2], state: present} sample:
{
"xpath": "xpath",
"namespaces": [
"namespace1",
"namespace2"
],
"state": "present"
}
backup_file: backup_file:
description: The name of the backup file that was created. description: The name of the backup file that was created.
type: str type: str