Adjust YAML in module docs (#10240)

* Adjust YAML in module docs.

* adjust modules

---------

Co-authored-by: Alexei Znamensky <russoz@gmail.com>
This commit is contained in:
Felix Fontein 2025-06-16 17:45:12 +02:00 committed by GitHub
parent e938ca5f20
commit e8f965fbf8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
89 changed files with 2085 additions and 1675 deletions

View file

@ -48,10 +48,51 @@ options:
description:
- Send a notification sound before the message.
required: false
choices: ["56k", "bell", "bezos", "bueller", "clowntown", "cottoneyejoe", "crickets", "dadgummit", "dangerzone", "danielsan",
"deeper", "drama", "greatjob", "greyjoy", "guarantee", "heygirl", "horn", "horror", "inconceivable", "live", "loggins",
"makeitso", "noooo", "nyan", "ohmy", "ohyeah", "pushit", "rimshot", "rollout", "rumble", "sax", "secret", "sexyback",
"story", "tada", "tmyk", "trololo", "trombone", "unix", "vuvuzela", "what", "whoomp", "yeah", "yodel"]
choices:
- 56k
- bell
- bezos
- bueller
- clowntown
- cottoneyejoe
- crickets
- dadgummit
- dangerzone
- danielsan
- deeper
- drama
- greatjob
- greyjoy
- guarantee
- heygirl
- horn
- horror
- inconceivable
- live
- loggins
- makeitso
- noooo
- nyan
- ohmy
- ohyeah
- pushit
- rimshot
- rollout
- rumble
- sax
- secret
- sexyback
- story
- tada
- tmyk
- trololo
- trombone
- unix
- vuvuzela
- what
- whoomp
- yeah
- yodel
# informational: requirements for nodes
requirements: []

View file

@ -345,8 +345,16 @@ record:
description: Additional record data.
returned: success, if type is SRV, DS, SSHFP TLSA or CAA
type: dict
sample: {name: "jabber", port: 8080, priority: 10, proto: "_tcp", service: "_xmpp", target: "jabberhost.sample.com",
weight: 5}
sample:
{
"name": "jabber",
"port": 8080,
"priority": 10,
"proto": "_tcp",
"service": "_xmpp",
"target": "jabberhost.sample.com",
"weight": 5
}
id:
description: The record ID.
returned: success
@ -361,7 +369,10 @@ record:
description: Extra Cloudflare-specific information about the record.
returned: success
type: dict
sample: {auto_added: false}
sample:
{
"auto_added": false
}
modified_on:
description: Record modification date.
returned: success

View file

@ -190,7 +190,10 @@ role:
"ModifyIndex": 39,
"Name": "foo-role",
"Policies": [
{"ID": "b1a00172-d7a1-0e66-a12e-7a4045c4b774", "Name": "foo-access"}
{
"ID": "b1a00172-d7a1-0e66-a12e-7a4045c4b774",
"Name": "foo-access"
}
]
}
operation:

View file

@ -129,7 +129,8 @@ downtime:
description: The downtime returned by the API.
type: dict
returned: always
sample: {
sample:
{
"active": true,
"canceled": null,
"creator_id": 1445416,

View file

@ -51,8 +51,23 @@ options:
type:
description:
- The type of DNS record to create.
choices: ['A', 'ALIAS', 'CNAME', 'MX', 'SPF', 'URL', 'TXT', 'NS', 'SRV', 'NAPTR', 'PTR', 'AAAA', 'SSHFP', 'HINFO', 'POOL',
'CAA']
choices:
- A
- ALIAS
- CNAME
- MX
- SPF
- URL
- TXT
- NS
- SRV
- NAPTR
- PTR
- AAAA
- SSHFP
- HINFO
- POOL
- CAA
type: str
ttl:
description:
@ -151,7 +166,7 @@ EXAMPLES = r"""
delegate_to: localhost
"""
RETURN = r"""# """
RETURN = r"""#"""
import traceback
import re

View file

@ -132,7 +132,13 @@ diversion:
state:
description: The state of the diversion.
type: str
sample: {"divert": "/etc/foobarrc.distrib", "holder": "LOCAL", "path": "/etc/foobarrc", "state": "present"}
sample:
{
"divert": "/etc/foobarrc.distrib",
"holder": "LOCAL",
"path": "/etc/foobarrc",
"state": "present"
}
"""

View file

@ -64,20 +64,42 @@ deleted_keys:
description: An array of key objects that were deleted. Only present on state=absent.
type: list
returned: When state=absent
sample: [{'id': 0, 'key': 'BASE64 encoded key', 'url': 'http://example.com/github key', 'created_at': 'YYYY-MM-DDTHH:MM:SZ',
'read_only': false}]
sample:
[
{
"id": 0,
"key": "BASE64 encoded key",
"url": "http://example.com/github key",
"created_at": "YYYY-MM-DDTHH:MM:SZ",
"read_only": false
}
]
matching_keys:
description: An array of keys matching the specified name. Only present on state=present.
type: list
returned: When state=present
sample: [{'id': 0, 'key': 'BASE64 encoded key', 'url': 'http://example.com/github key', 'created_at': 'YYYY-MM-DDTHH:MM:SZ',
'read_only': false}]
sample:
[
{
"id": 0,
"key": "BASE64 encoded key",
"url": "http://example.com/github key",
"created_at": "YYYY-MM-DDTHH:MM:SZ",
"read_only": false
}
]
key:
description: Metadata about the key just created. Only present on state=present.
type: dict
returned: success
sample: {'id': 0, 'key': 'BASE64 encoded key', 'url': 'http://example.com/github key', 'created_at': 'YYYY-MM-DDTHH:MM:SZ',
'read_only': false}
sample:
{
"id": 0,
"key": "BASE64 encoded key",
"url": "http://example.com/github key",
"created_at": "YYYY-MM-DDTHH:MM:SZ",
"read_only": false
}
"""
EXAMPLES = r"""

View file

@ -76,16 +76,17 @@ hooks:
type: list
elements: dict
sample:
- {
"has_shared_secret": true,
"url": "https://jenkins.example.com/ghprbhook/",
"events": ["issue_comment", "pull_request"],
"insecure_ssl": "1",
"content_type": "json",
"active": true,
"id": 6206,
"last_response": {"status": "active", "message": "OK", "code": 200}
}
- has_shared_secret: true
url: https://jenkins.example.com/ghprbhook/
events: [issue_comment, pull_request]
insecure_ssl: "1"
content_type: json
active: true
id: 6206
last_response:
status: active
message: OK
code: 200
"""
import traceback

View file

@ -55,8 +55,16 @@ options:
type: list
elements: str
aliases: ["scope"]
choices: ["api", "read_api", "read_registry", "write_registry", "read_repository", "write_repository", "create_runner",
"ai_features", "k8s_proxy"]
choices:
- api
- read_api
- read_registry
- write_registry
- read_repository
- write_repository
- create_runner
- ai_features
- k8s_proxy
access_level:
description:
- Access level of the access token.

View file

@ -55,8 +55,16 @@ options:
type: list
elements: str
aliases: ["scope"]
choices: ["api", "read_api", "read_registry", "write_registry", "read_repository", "write_repository", "create_runner",
"ai_features", "k8s_proxy"]
choices:
- api
- read_api
- read_registry
- write_registry
- read_repository
- write_repository
- create_runner
- ai_features
- k8s_proxy
access_level:
description:
- Access level of the access token.

View file

@ -221,7 +221,8 @@ data:
description: Dictionary returned from C(homectl inspect -j).
returned: success
type: dict
sample: {
sample:
{
"data": {
"binding": {
"e9ed2a5b0033427286b228e97c1e8343": {
@ -263,7 +264,7 @@ data:
"state": "inactive"
}
},
"userName": "james",
"userName": "james"
}
}
"""

View file

@ -67,7 +67,7 @@ EXAMPLES = r"""
repo: 'git@github.com:user/repo.git'
"""
RETURN = """# """
RETURN = """#"""
import traceback

View file

@ -126,7 +126,7 @@ network_info:
"network_size": null,
"description": null,
"network_location": "3085",
"ranges": { "id": 0, "name": null,"first_ip": null,"type": null,"last_ip": null},
"ranges": {"id": 0, "name": null, "first_ip": null, "type": null, "last_ip": null},
"network_type": "lan",
"network_name": "'reserve_new_ansible_network'"
}

View file

@ -101,9 +101,7 @@ EXAMPLES = r"""
state: absent
"""
RETURN = r"""
#only defaults
"""
RETURN = r"""#"""
import json

View file

@ -111,7 +111,17 @@ status:
targetAddress:
description: The remote target address.
type: int
sample: [{"powerstate": "on", "targetAddress": 48}, {"powerstate": "on", "targetAddress": 50}]
sample:
[
{
"powerstate": "on",
"targetAddress": 48
},
{
"powerstate": "on",
"targetAddress": 50
}
]
"""
EXAMPLES = r"""

View file

@ -147,7 +147,8 @@ initial_state:
type: list
elements: str
returned: always
sample: [
sample:
[
"# Generated by xtables-save v1.8.2",
"*filter",
":INPUT ACCEPT [0:0]",
@ -161,7 +162,8 @@ restored:
type: list
elements: str
returned: always
sample: [
sample:
[
"# Generated by xtables-save v1.8.2",
"*filter",
":INPUT DROP [0:0]",
@ -180,7 +182,8 @@ saved:
type: list
elements: str
returned: always
sample: [
sample:
[
"# Generated by xtables-save v1.8.2",
"*filter",
":INPUT ACCEPT [0:0]",

View file

@ -51,8 +51,24 @@ options:
description:
- Text color for the message.
default: "none"
choices: ["none", "white", "black", "blue", "green", "red", "brown", "purple", "orange", "yellow", "light_green", "teal",
"light_cyan", "light_blue", "pink", "gray", "light_gray"]
choices:
- none
- white
- black
- blue
- green
- red
- brown
- purple
- orange
- yellow
- light_green
- teal
- light_cyan
- light_blue
- pink
- gray
- light_gray
aliases: [colour]
channel:
type: str

View file

@ -135,7 +135,7 @@ jobs:
"fullname": "test-folder/test-job",
"url": "http://localhost:8080/job/test-job/",
"color": "blue"
},
}
]
"""

View file

@ -193,14 +193,17 @@ end_state:
description: Representation of the authentication after module execution.
returned: on success
type: dict
sample: {
sample:
{
"alias": "Copy of first broker login",
"authenticationExecutions": [
{
"alias": "review profile config",
"authenticationConfig": {
"alias": "review profile config",
"config": { "update.profile.on.first.login": "missing" },
"config": {
"update.profile.on.first.login": "missing"
},
"id": "6f09e4fb-aad4-496a-b873-7fa9779df6d7"
},
"configurable": true,
@ -210,7 +213,11 @@ end_state:
"level": 0,
"providerId": "idp-review-profile",
"requirement": "REQUIRED",
"requirementChoices": [ "REQUIRED", "ALTERNATIVE", "DISABLED" ]
"requirementChoices": [
"REQUIRED",
"ALTERNATIVE",
"DISABLED"
]
}
],
"builtIn": false,

View file

@ -130,7 +130,8 @@ end_state:
returned: on success
type: list
elements: dict
sample: [
sample:
[
{
"clientRole": false,
"composite": false,

View file

@ -238,21 +238,36 @@ proposed:
description: Representation of proposed client template.
returned: always
type: dict
sample: {name: "test01"}
sample:
{
"name": "test01"
}
existing:
description: Representation of existing client template (sample is truncated).
returned: always
type: dict
sample: {"description": "test01", "fullScopeAllowed": false, "id": "9c3712ab-decd-481e-954f-76da7b006e5f", "name": "test01",
"protocol": "saml"}
sample:
{
"description": "test01",
"fullScopeAllowed": false,
"id": "9c3712ab-decd-481e-954f-76da7b006e5f",
"name": "test01",
"protocol": "saml"
}
end_state:
description: Representation of client template after module execution (sample is truncated).
returned: on success
type: dict
sample: {"description": "test01", "fullScopeAllowed": false, "id": "9c3712ab-decd-481e-954f-76da7b006e5f", "name": "test01",
"protocol": "saml"}
sample:
{
"description": "test01",
"fullScopeAllowed": false,
"id": "9c3712ab-decd-481e-954f-76da7b006e5f",
"name": "test01",
"protocol": "saml"
}
"""
from ansible_collections.community.general.plugins.module_utils.identity.keycloak.keycloak import KeycloakAPI, camel, \

View file

@ -357,7 +357,8 @@ proposed:
description: Representation of proposed identity provider.
returned: always
type: dict
sample: {
sample:
{
"config": {
"authorizationUrl": "https://idp.example.com/auth",
"clientAuthMethod": "client_secret_post",
@ -375,7 +376,8 @@ existing:
description: Representation of existing identity provider.
returned: always
type: dict
sample: {
sample:
{
"addReadTokenRoleOnCreate": false,
"alias": "my-idp",
"authenticateByDefault": false,
@ -396,14 +398,15 @@ existing:
"linkOnly": false,
"providerId": "oidc",
"storeToken": false,
"trustEmail": false,
"trustEmail": false
}
end_state:
description: Representation of identity provider after module execution.
returned: on success
type: dict
sample: {
sample:
{
"addReadTokenRoleOnCreate": false,
"alias": "my-idp",
"authenticateByDefault": false,
@ -423,7 +426,7 @@ end_state:
"linkOnly": false,
"providerId": "oidc",
"storeToken": false,
"trustEmail": false,
"trustEmail": false
}
"""

View file

@ -195,21 +195,40 @@ proposed:
description: Representation of proposed role.
returned: always
type: dict
sample: {"description": "My updated test description"}
sample:
{
"description": "My updated test description"
}
existing:
description: Representation of existing role.
returned: always
type: dict
sample: {"attributes": {}, "clientRole": true, "composite": false, "containerId": "9f03eb61-a826-4771-a9fd-930e06d2d36a",
"description": "My client test role", "id": "561703dd-0f38-45ff-9a5a-0c978f794547", "name": "myrole"}
sample:
{
"attributes": {},
"clientRole": true,
"composite": false,
"containerId": "9f03eb61-a826-4771-a9fd-930e06d2d36a",
"description": "My client test role",
"id": "561703dd-0f38-45ff-9a5a-0c978f794547",
"name": "myrole"
}
end_state:
description: Representation of role after module execution (sample is truncated).
returned: on success
type: dict
sample: {"attributes": {}, "clientRole": true, "composite": false, "containerId": "9f03eb61-a826-4771-a9fd-930e06d2d36a",
"description": "My updated client test role", "id": "561703dd-0f38-45ff-9a5a-0c978f794547", "name": "myrole"}
sample:
{
"attributes": {},
"clientRole": true,
"composite": false,
"containerId": "9f03eb61-a826-4771-a9fd-930e06d2d36a",
"description": "My updated client test role",
"id": "561703dd-0f38-45ff-9a5a-0c978f794547",
"name": "myrole"
}
"""
from ansible_collections.community.general.plugins.module_utils.identity.keycloak.keycloak import KeycloakAPI, camel, \

View file

@ -601,7 +601,8 @@ proposed:
description: Representation of proposed user federation.
returned: always
type: dict
sample: {
sample:
{
"config": {
"allowKerberosAuthentication": "false",
"authType": "simple",
@ -639,7 +640,8 @@ existing:
description: Representation of existing user federation.
returned: always
type: dict
sample: {
sample:
{
"config": {
"allowKerberosAuthentication": "false",
"authType": "simple",
@ -697,7 +699,8 @@ end_state:
description: Representation of user federation after module execution.
returned: on success
type: dict
sample: {
sample:
{
"config": {
"allowPasswordAuthentication": "false",
"cachePolicy": "DEFAULT",

View file

@ -45,7 +45,7 @@ options:
author: "Jimmy Tang (@jcftang) <jimmy_tang@rapid7.com>"
"""
RETURN = """# """
RETURN = """#"""
EXAMPLES = r"""
- name: Send a message to logentries

View file

@ -9,8 +9,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = r'''
---
DOCUMENTATION = r"""
module: lvm_pv
short_description: Manage LVM Physical Volumes
version_added: "11.0.0"
@ -28,7 +27,7 @@ options:
description:
- Control if the physical volume exists.
type: str
choices: [ present, absent ]
choices: [present, absent]
default: present
force:
description:
@ -45,9 +44,9 @@ options:
notes:
- Requires LVM2 utilities installed on the target system.
- Device path must exist when creating a PV.
'''
"""
EXAMPLES = r'''
EXAMPLES = r"""
- name: Creating physical volume on /dev/sdb
community.general.lvm_pv:
device: /dev/sdb
@ -67,10 +66,10 @@ EXAMPLES = r'''
device: /dev/sdb
force: true
state: absent
'''
"""
RETURN = r'''
'''
RETURN = r"""
"""
import os

View file

@ -45,8 +45,21 @@ options:
description:
- The type of the resource to which the profile should be [un]assigned.
required: true
choices: ['provider', 'host', 'vm', 'blueprint', 'category', 'cluster', 'data store', 'group', 'resource pool', 'service',
'service template', 'template', 'tenant', 'user']
choices:
- provider
- host
- vm
- blueprint
- category
- cluster
- data store
- group
- resource pool
- service
- service template
- template
- tenant
- user
resource_name:
type: str
description:
@ -93,7 +106,8 @@ manageiq_policies:
- List current policy_profile and policies for a provider in ManageIQ.
returned: always
type: dict
sample: {
sample:
{
"changed": false,
"profiles": [
{

View file

@ -29,8 +29,21 @@ options:
description:
- The type of the resource to obtain the profile for.
required: true
choices: ['provider', 'host', 'vm', 'blueprint', 'category', 'cluster', 'data store', 'group', 'resource pool', 'service',
'service template', 'template', 'tenant', 'user']
choices:
- provider
- host
- vm
- blueprint
- category
- cluster
- data store
- group
- resource pool
- service
- service template
- template
- tenant
- user
resource_name:
type: str
description:

View file

@ -45,8 +45,21 @@ options:
description:
- The relevant resource type in manageiq.
required: true
choices: ['provider', 'host', 'vm', 'blueprint', 'category', 'cluster', 'data store', 'group', 'resource pool', 'service',
'service template', 'template', 'tenant', 'user']
choices:
- provider
- host
- vm
- blueprint
- category
- cluster
- data store
- group
- resource pool
- service
- service template
- template
- tenant
- user
resource_name:
type: str
description:

View file

@ -27,8 +27,21 @@ options:
description:
- The relevant resource type in ManageIQ.
required: true
choices: ['provider', 'host', 'vm', 'blueprint', 'category', 'cluster', 'data store', 'group', 'resource pool', 'service',
'service template', 'template', 'tenant', 'user']
choices:
- provider
- host
- vm
- blueprint
- category
- cluster
- data store
- group
- resource pool
- service
- service template
- template
- tenant
- user
resource_name:
type: str
description:

View file

@ -74,7 +74,8 @@ memset_api:
description: Details about the firewall group this server is in.
returned: always
type: dict
sample: {
sample:
{
"default_outbound_policy": "RETURN",
"name": "testyaa-fw1",
"nickname": "testyaa cPanel rules",
@ -118,7 +119,8 @@ memset_api:
description: List of dictionaries of all IP addresses assigned to the server.
returned: always
type: list
sample: [
sample:
[
{
"address": "1.2.3.4",
"bytes_in_today": 1000.0,
@ -221,9 +223,13 @@ memset_api:
description: Dictionary of tagged and untagged VLANs this server is in.
returned: always
type: dict
sample: {
tagged: [],
untagged: [ 'testyaa-vlan1', 'testyaa-vlan2' ]
sample:
{
"tagged": [],
"untagged": [
"testyaa-vlan1",
"testyaa-vlan2"
]
}
vulnscan:
description: Vulnerability scanning level.

View file

@ -40,8 +40,20 @@ options:
- Action to take.
- The V(acknowledge) and V(forced_check) actions were added in community.general 1.2.0.
required: true
choices: ["downtime", "delete_downtime", "enable_alerts", "disable_alerts", "silence", "unsilence", "silence_nagios",
"unsilence_nagios", "command", "servicegroup_service_downtime", "servicegroup_host_downtime", "acknowledge", "forced_check"]
choices:
- downtime
- delete_downtime
- enable_alerts
- disable_alerts
- silence
- unsilence
- silence_nagios
- unsilence_nagios
- command
- servicegroup_service_downtime
- servicegroup_host_downtime
- acknowledge
- forced_check
type: str
host:
description:

View file

@ -95,8 +95,32 @@ options:
- If you want to control non-ethernet connection attached to V(bond), V(bridge), or V(team) consider using O(slave_type)
option.
type: str
choices: [bond, bond-slave, bridge, bridge-slave, dummy, ethernet, generic, gre, infiniband, ipip, macvlan, sit, team,
team-slave, vlan, vxlan, wifi, gsm, wireguard, ovs-bridge, ovs-port, ovs-interface, vpn, vrf, loopback]
choices:
- bond
- bond-slave
- bridge
- bridge-slave
- dummy
- ethernet
- generic
- gre
- infiniband
- ipip
- macvlan
- sit
- team
- team-slave
- vlan
- vxlan
- wifi
- gsm
- wireguard
- ovs-bridge
- ovs-port
- ovs-interface
- vpn
- vrf
- loopback
mode:
description:
- This is the type of device or network connection that you wish to create for a bond or bridge.

View file

@ -49,10 +49,11 @@ EXAMPLES = r"""
RETURN = r"""
result:
description: List with dictionary contains jobs info
description: List with dictionary contains jobs info.
returned: success
type: list
sample: [
sample:
[
{
"Affinities": null,
"AllAtOnce": false,
@ -261,7 +262,6 @@ result:
"Version": 0
}
]
"""
from ansible.module_utils.basic import AnsibleModule, missing_required_lib

View file

@ -101,7 +101,8 @@ result:
description: Result returned by nomad.
returned: always
type: dict
sample: {
sample:
{
"accessor_id": "0d01c55f-8d63-f832-04ff-1866d4eb594e",
"create_index": 14,
"create_time": "2023-11-12T18:48:34.248857001Z",

View file

@ -123,7 +123,8 @@ status:
description: Dictionary containing status information. See OCAPI documentation for details.
returned: when supported
type: dict
sample: {
sample:
{
"Details": [
"None"
],

View file

@ -78,12 +78,13 @@ EXAMPLES = r"""
RETURN = r"""
vcn:
description: Information about the VCN
description: Information about the VCN.
returned: On successful create and update operation
type: dict
sample: {
sample:
{
"cidr_block": "10.0.0.0/16",
compartment_id": "ocid1.compartment.oc1..xxxxxEXAMPLExxxxx",
"compartment_id\"": "ocid1.compartment.oc1..xxxxxEXAMPLExxxxx",
"default_dhcp_options_id": "ocid1.dhcpoptions.oc1.phx.xxxxxEXAMPLExxxxx",
"default_route_table_id": "ocid1.routetable.oc1.phx.xxxxxEXAMPLExxxxx",
"default_security_list_id": "ocid1.securitylist.oc1.phx.xxxxxEXAMPLExxxxx",

View file

@ -144,7 +144,7 @@ EXAMPLES = r"""
firewall_policy: ansible-firewall-policy-updated
add_server_ips:
- server_identifier (id or name)
- server_identifier #2 (id or name)
- "server_identifier #2 (id or name)"
wait: true
wait_timeout: 500
state: update
@ -182,8 +182,8 @@ EXAMPLES = r"""
auth_token: oneandone_private_api_key
firewall_policy: ansible-firewall-policy-updated
remove_rules:
- rule_id #1
- rule_id #2
- "rule_id #1"
- "rule_id #2"
- '...'
wait: true
wait_timeout: 500

View file

@ -233,8 +233,8 @@ EXAMPLES = r"""
load_balancer: ansible load balancer updated
description: Adding rules to a load balancer with ansible
remove_rules:
- rule_id #1
- rule_id #2
- "rule_id #1"
- "rule_id #2"
- '...'
wait: true
wait_timeout: 500

View file

@ -8,8 +8,7 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: pacemaker_resource
short_description: Manage pacemaker resources
author:
@ -28,7 +27,7 @@ options:
state:
description:
- Indicate desired state for cluster resource.
choices: [ present, absent, enabled, disabled ]
choices: [present, absent, enabled, disabled]
default: present
type: str
name:
@ -89,7 +88,7 @@ options:
description:
- Action to apply to resource.
type: str
choices: [ clone, master, group, promotable ]
choices: [clone, master, group, promotable]
argument_option:
description:
- Options to associate with resource action.
@ -100,9 +99,9 @@ options:
- Timeout period for polling the resource creation.
type: int
default: 300
'''
"""
EXAMPLES = '''
EXAMPLES = r"""
---
- name: Create pacemaker resource
hosts: localhost
@ -124,15 +123,15 @@ EXAMPLES = '''
- operation_action: monitor
operation_option:
- interval=20
'''
"""
RETURN = '''
RETURN = r"""
cluster_resources:
description: The cluster resource output message.
type: str
sample: "Assumed agent name ocf:heartbeat:IPaddr2 (deduced from IPaddr2)"
returned: always
'''
"""
from ansible_collections.community.general.plugins.module_utils.module_helper import StateModuleHelper
from ansible_collections.community.general.plugins.module_utils.pacemaker import pacemaker_runner, get_pacemaker_maintenance_mode

View file

@ -268,16 +268,14 @@ devices:
description: Information about each device that was processed.
type: list
sample:
- {
"hostname": "my-server.com",
"id": "2a5122b9-c323-4d5c-b53c-9ad3f54273e7",
"public_ipv4": "147.229.15.12",
"private-ipv4": "10.0.15.12",
"tags": [],
"locked": false,
"state": "provisioning",
- "hostname": "my-server.com"
"id": "2a5122b9-c323-4d5c-b53c-9ad3f54273e7"
"public_ipv4": "147.229.15.12"
"private-ipv4": "10.0.15.12"
"tags": []
"locked": false
"state": "provisioning"
"public_ipv6": "2604:1380:2:5200::3"
}
returned: success
"""

View file

@ -93,7 +93,8 @@ changed:
sshkeys:
description: Information about sshkeys that were created/removed.
type: list
sample: [
sample:
[
{
"fingerprint": "5c:93:74:7c:ed:07:17:62:28:75:79:23:d6:08:93:46",
"id": "41d61bd8-3342-428b-a09c-e67bdd18a9b7",

View file

@ -140,35 +140,31 @@ partition_info:
script:
description: Parted script executed by module.
type: str
sample: {
"disk": {
"dev": "/dev/sdb",
"logical_block": 512,
"model": "VMware Virtual disk",
"physical_block": 512,
"size": 5.0,
"table": "msdos",
sample:
"disk":
"dev": "/dev/sdb"
"logical_block": 512
"model": "VMware Virtual disk"
"physical_block": 512
"size": 5.0
"table": "msdos"
"unit": "gib"
},
"partitions": [{
"begin": 0.0,
"end": 1.0,
"flags": ["boot", "lvm"],
"fstype": "",
"name": "",
"num": 1,
"partitions":
- "begin": 0.0
"end": 1.0
"flags": ["boot", "lvm"]
"fstype": ""
"name": ""
"num": 1
"size": 1.0
}, {
"begin": 1.0,
"end": 5.0,
"flags": [],
"fstype": "",
"name": "",
"num": 2,
- "begin": 1.0
"end": 5.0
"flags": []
"fstype": ""
"name": ""
"num": 2
"size": 4.0
}],
"script": "unit KiB print "
}
"""
EXAMPLES = r"""

View file

@ -73,7 +73,7 @@ response:
"auth_token": null,
"user_count": 0,
"auth_secret": null,
"id": "csftwlu6uhralzi2dpmhekz3",
"id": "csftwlu6uhralzi2dpmhekz3"
}
"""

View file

@ -53,7 +53,7 @@ organizations:
"auth_token": null,
"user_count": 0,
"auth_secret": null,
"id": "csftwlu6uhralzi2dpmhekz3",
"id": "csftwlu6uhralzi2dpmhekz3"
},
{
"auth_api": false,
@ -61,7 +61,7 @@ organizations:
"auth_token": null,
"user_count": 3,
"auth_secret": null,
"id": "58070daee63f3b2e6e472c36",
"id": "58070daee63f3b2e6e472c36"
},
{
"auth_api": false,
@ -69,7 +69,7 @@ organizations:
"auth_token": null,
"user_count": 0,
"auth_secret": null,
"id": "v1sncsxxybnsylc8gpqg85pg",
"id": "v1sncsxxybnsylc8gpqg85pg"
}
]
"""

View file

@ -131,7 +131,8 @@ response:
"email": "foo@bar.com",
"gravatar": true,
"groups": [
"foo", "bar"
"foo",
"bar"
],
"id": "5d070dafe63q3b2e6s472c3b",
"name": "foo@acme.com",
@ -142,7 +143,7 @@ response:
"otp_secret": "35H5EJA3XB2$4CWG",
"pin": false,
"port_forwarding": [],
"servers": [],
"servers": []
}
"""

View file

@ -76,7 +76,8 @@ users:
"email": "foo@bar.com",
"gravatar": true,
"groups": [
"foo", "bar"
"foo",
"bar"
],
"id": "5d070dafe63q3b2e6s472c3b",
"name": "foo@acme.com",
@ -87,7 +88,7 @@ users:
"otp_secret": "35H5EJA3XB2$4CWG",
"pin": false,
"port_forwarding": [],
"servers": [],
"servers": []
}
]
"""

View file

@ -81,7 +81,7 @@ EXAMPLES = r"""
community.general.pushbullet:
api_key: ABC123abc123ABC123abc123ABC123ab
channel: my-awesome-channel
title: Broadcasting a message to the #my-awesome-channel folks
title: "Broadcasting a message to the #my-awesome-channel folks"
- name: Sends a push notification with title and body to a channel
community.general.pushbullet:

View file

@ -63,7 +63,8 @@ info:
description: The default set of server information sections U(https://redis.io/commands/info).
returned: success
type: dict
sample: {
sample:
{
"active_defrag_hits": 0,
"active_defrag_key_hits": 0,
"active_defrag_key_misses": 0,
@ -196,8 +197,9 @@ cluster:
returned: success if O(cluster=true)
version_added: 9.1.0
type: dict
sample: {
"cluster_state": ok,
sample:
{
"cluster_state": "ok",
"cluster_slots_assigned": 16384,
"cluster_slots_ok": 16384,
"cluster_slots_pfail": 0,

View file

@ -156,7 +156,8 @@ vm:
description: Returns all of the VMs variables and execution.
returned: always
type: dict
sample: {
sample:
{
"boot_order": [
"hd",
"network"

View file

@ -124,7 +124,7 @@ EXAMPLES = r"""
domain: chat.example.com
token: thetoken/generatedby/rocketchat
msg: '{{ inventory_hostname }} completed'
channel: #ansible
channel: "#ansible"
username: 'Ansible on {{ inventory_hostname }}'
icon_url: http://www.example.com/some-image-file.png
link_names: 0
@ -147,7 +147,7 @@ EXAMPLES = r"""
domain: chat.example.com
attachments:
- text: Display my system load on host A and B
color: #ff00dd
color: "#ff00dd"
title: System load
fields:
- title: System A

View file

@ -80,13 +80,20 @@ paging:
description: Maximum number of results per page.
type: int
returned: success
sample: {"count": 20, "total": 100, "offset": 0, "max": 20}
sample:
{
"count": 20,
"total": 100,
"offset": 0,
"max": 20
}
executions:
description: Job executions list.
returned: always
type: list
elements: dict
sample: [
sample:
[
{
"id": 1,
"href": "https://rundeck.example.org/api/39/execution/1",

View file

@ -136,7 +136,8 @@ execution_info:
description: Rundeck job execution metadata.
returned: always
type: dict
sample: {
sample:
{
"msg": "Job execution succeeded!",
"execution_info": {
"id": 1,

View file

@ -146,7 +146,8 @@ metadata:
description: Backup metadata.
returned: when O(state=present), O(state=exported), or O(state=restored)
type: dict
sample: {
sample:
{
"metadata": {
"created_at": "2020-08-06T12:42:05.631049Z",
"database_name": "my-database",

View file

@ -93,7 +93,8 @@ data:
description: This is only present when O(state=present).
returned: when O(state=present)
type: dict
sample: {
sample:
{
"ips": [
{
"organization": "951df375-e094-4d26-97c1-ba548eeb9c42",

View file

@ -112,7 +112,8 @@ data:
description: This is only present when O(state=present).
returned: when O(state=present)
type: dict
sample: {
sample:
{
"scaleway_security_group": {
"description": "my security group description",
"enable_default_security": true,

View file

@ -119,7 +119,8 @@ data:
description: This is only present when O(state=present).
returned: when O(state=present)
type: dict
sample: {
sample:
{
"scaleway_security_group_rule": {
"direction": "inbound",
"protocol": "TCP",

View file

@ -74,9 +74,12 @@ data:
description: This is only present when O(state=present).
returned: when O(state=present)
type: dict
sample: {
sample:
{
"ssh_public_keys": [
{"key": "ssh-rsa AAAA...."}
{
"key": "ssh-rsa AAAA...."
}
]
}
"""

View file

@ -98,7 +98,8 @@ data:
description: This is only present when O(state=present).
returned: when O(state=present)
type: dict
sample: {
sample:
{
"volume": {
"export_uri": null,
"id": "c675f420-cfeb-48ff-ba2a-9d2a4dbe3fcd",
@ -108,7 +109,7 @@ data:
"size": 10000000000,
"volume_type": "l_ssd"
}
}
}
"""
from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, scaleway_argument_spec, Scaleway

View file

@ -267,7 +267,7 @@ EXAMPLES = r"""
"""
# TODO: Disabled RETURN as it is breaking the build for docs. Needs to be fixed.
RETURN = """# """
RETURN = """#"""
import json
import time

View file

@ -113,7 +113,7 @@ ansible_sysdescr:
description: A textual description of the entity.
returned: success
type: str
sample: Linux ubuntu-user 4.4.0-93-generic #116-Ubuntu SMP Fri Aug 11 21:17:51 UTC 2017 x86_64
sample: "Linux ubuntu-user 4.4.0-93-generic #116-Ubuntu SMP Fri Aug 11 21:17:51 UTC 2017 x86_64"
ansible_sysobjectid:
description: The vendor's authoritative identification of the network management subsystem contained in the entity.
returned: success
@ -149,7 +149,8 @@ ansible_interfaces:
description: Dictionary of each network interface and its metadata.
returned: success
type: dict
sample: {
sample:
{
"1": {
"adminstatus": "up",
"description": "",

View file

@ -697,8 +697,15 @@ instances:
description: List of active elastigroup instances and their details.
returned: success
type: dict
sample: [{"spotInstanceRequestId": "sir-regs25zp", "instanceId": "i-09640ad8678234c", "instanceType": "m4.large", "product": "Linux/UNIX",
"availabilityZone": "us-west-2b", "privateIp": "180.0.2.244", "createdAt": "2017-07-17T12:46:18.000Z", "status": "fulfilled"}]
sample:
- "spotInstanceRequestId": "sir-regs25zp"
"instanceId": "i-09640ad8678234c"
"instanceType": "m4.large"
"product": "Linux/UNIX"
"availabilityZone": "us-west-2b"
"privateIp": "180.0.2.244"
"createdAt": "2017-07-17T12:46:18.000Z"
"status": "fulfilled"
group_id:
description: Created / Updated group's ID.
returned: success

View file

@ -35,8 +35,25 @@ options:
type: str
description:
- Set the log facility.
choices: ["kern", "user", "mail", "daemon", "auth", "lpr", "news", "uucp", "cron", "syslog", "local0", "local1", "local2",
"local3", "local4", "local5", "local6", "local7"]
choices:
- kern
- user
- mail
- daemon
- auth
- lpr
- news
- uucp
- cron
- syslog
- local0
- local1
- local2
- local3
- local4
- local5
- local6
- local7
default: "daemon"
log_pid:
description:

View file

@ -8,8 +8,7 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = r'''
---
DOCUMENTATION = r"""
module: systemd_info
short_description: Gather C(systemd) unit info
description:
@ -48,9 +47,9 @@ author:
extends_documentation_fragment:
- community.general.attributes
- community.general.attributes.info_module
'''
"""
EXAMPLES = r'''
EXAMPLES = r"""
---
# Gather info for all systemd services, targets, sockets, mount and timer
- name: Gather all systemd unit info
@ -84,9 +83,9 @@ EXAMPLES = r'''
extra_properties:
- AccuracyUSec
register: results
'''
"""
RETURN = r'''
RETURN = r"""
units:
description:
- Dictionary of systemd unit info keyed by unit name.
@ -170,7 +169,8 @@ units:
returned: only for C(.mount) units.
type: str
sample: /
sample: {
sample:
{
"-.mount": {
"activestate": "active",
"description": "Root Mount",
@ -215,7 +215,7 @@ units:
"unitfilestate": "static"
}
}
'''
"""
import fnmatch
from ansible.module_utils.basic import AnsibleModule

View file

@ -119,7 +119,7 @@ EXAMPLES = r"""
state: absent
"""
RETURN = """# """
RETURN = """#"""
import traceback
from os import getenv

View file

@ -55,7 +55,7 @@ EXAMPLES = r"""
community.general.telegram:
token: '9999999:XXXXXXXXXXXXXXXXXXXXXXX'
api_args:
chat_id: 000000
chat_id: "000000"
parse_mode: "markdown"
text: "Your precious application has been deployed: https://example.com"
disable_web_page_preview: true
@ -66,7 +66,7 @@ EXAMPLES = r"""
token: '9999999:XXXXXXXXXXXXXXXXXXXXXXX'
api_method: forwardMessage
api_args:
chat_id: 000000
chat_id: "000000"
from_chat_id: 111111
disable_notification: true
message_id: '{{ saved_msg_id }}'

View file

@ -102,7 +102,7 @@ EXAMPLES = r"""
"""
RETURN = """# """
RETURN = """#"""
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.univention_umc import (

View file

@ -85,7 +85,7 @@ EXAMPLES = r"""
"""
RETURN = """# """
RETURN = """#"""
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.univention_umc import (

View file

@ -340,7 +340,7 @@ EXAMPLES = r"""
"""
RETURN = """# """
RETURN = """#"""
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.univention_umc import (

View file

@ -317,7 +317,7 @@ EXAMPLES = r"""
"""
RETURN = """# """
RETURN = """#"""
from datetime import date, timedelta
import traceback

View file

@ -220,7 +220,7 @@ EXAMPLES = r"""
state: absent
"""
RETURN = r"""# """
RETURN = r"""#"""
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
import re

View file

@ -64,7 +64,8 @@ instance:
description: Metadata about the VM.
returned: always
type: dict
sample: {
sample:
{
"cdrom": {
"type": "none"
},

View file

@ -91,7 +91,8 @@ instance:
description: Metadata about the VM.
returned: always
type: dict
sample: {
sample:
{
"cdrom": {
"type": "none"
},

View file

@ -93,16 +93,63 @@ zfs_datasets:
description: ZFS dataset facts.
returned: always
type: str
sample: {"aclinherit": "restricted", "aclmode": "discard", "atime": "on", "available": "43.8G", "canmount": "on", "casesensitivity": "sensitive",
"checksum": "on", "compression": "off", "compressratio": "1.00x", "copies": "1", "creation": "Thu Jun 16 11:37 2016",
"dedup": "off", "devices": "on", "exec": "on", "filesystem_count": "none", "filesystem_limit": "none", "logbias": "latency",
"logicalreferenced": "18.5K", "logicalused": "3.45G", "mlslabel": "none", "mounted": "yes", "mountpoint": "/rpool", "name": "rpool",
"nbmand": "off", "normalization": "none", "org.openindiana.caiman:install": "ready", "primarycache": "all", "quota": "none",
"readonly": "off", "recordsize": "128K", "redundant_metadata": "all", "refcompressratio": "1.00x", "referenced": "29.5K",
"refquota": "none", "refreservation": "none", "reservation": "none", "secondarycache": "all", "setuid": "on", "sharenfs": "off",
"sharesmb": "off", "snapdir": "hidden", "snapshot_count": "none", "snapshot_limit": "none", "sync": "standard", "type": "filesystem",
"used": "4.41G", "usedbychildren": "4.41G", "usedbydataset": "29.5K", "usedbyrefreservation": "0", "usedbysnapshots": "0",
"utf8only": "off", "version": "5", "vscan": "off", "written": "29.5K", "xattr": "on", "zoned": "off"}
sample:
"aclinherit": "restricted"
"aclmode": "discard"
"atime": "on"
"available": "43.8G"
"canmount": "on"
"casesensitivity": "sensitive"
"checksum": "on"
"compression": "off"
"compressratio": "1.00x"
"copies": "1"
"creation": "Thu Jun 16 11:37 2016"
"dedup": "off"
"devices": "on"
"exec": "on"
"filesystem_count": "none"
"filesystem_limit": "none"
"logbias": "latency"
"logicalreferenced": "18.5K"
"logicalused": "3.45G"
"mlslabel": "none"
"mounted": "yes"
"mountpoint": "/rpool"
"name": "rpool"
"nbmand": "off"
"normalization": "none"
"org.openindiana.caiman:install": "ready"
"primarycache": "all"
"quota": "none"
"readonly": "off"
"recordsize": "128K"
"redundant_metadata": "all"
"refcompressratio": "1.00x"
"referenced": "29.5K"
"refquota": "none"
"refreservation": "none"
"reservation": "none"
"secondarycache": "all"
"setuid": "on"
"sharenfs": "off"
"sharesmb": "off"
"snapdir": "hidden"
"snapshot_count": "none"
"snapshot_limit": "none"
"sync": "standard"
"type": "filesystem"
"used": "4.41G"
"usedbychildren": "4.41G"
"usedbydataset": "29.5K"
"usedbyrefreservation": "0"
"usedbysnapshots": "0"
"utf8only": "off"
"version": "5"
"vscan": "off"
"written": "29.5K"
"xattr": "on"
"zoned": "off"
"""
from collections import defaultdict

View file

@ -8,7 +8,7 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = r'''
DOCUMENTATION = r"""
module: zpool
short_description: Manage ZFS zpools
version_added: 11.0.0
@ -35,7 +35,7 @@ options:
state:
description:
- Whether the pool should exist.
choices: [ present, absent ]
choices: [present, absent]
default: present
type: str
disable_new_features:
@ -80,12 +80,12 @@ options:
description:
- Special vdev role (for example V(log), V(cache), V(spare)).
type: str
choices: [ log, cache, spare, dedup, special ]
choices: [log, cache, spare, dedup, special]
type:
description:
- Vdev topology (for example V(stripe), V(mirror), V(raidz)).
type: str
choices: [ stripe, mirror, raidz, raidz1, raidz2, raidz3 ]
choices: [stripe, mirror, raidz, raidz1, raidz2, raidz3]
default: stripe
disks:
description:
@ -93,9 +93,9 @@ options:
required: true
type: list
elements: path
'''
"""
EXAMPLES = r'''
EXAMPLES = r"""
- name: Create pool "tank" on /dev/sda
community.general.zpool:
name: tank
@ -137,7 +137,7 @@ EXAMPLES = r'''
community.general.zpool:
name: tank
state: absent
'''
"""
import re
from ansible.module_utils.basic import AnsibleModule

View file

@ -64,14 +64,46 @@ ansible_facts:
description: ZFS pool facts.
returned: always
type: str
sample: {"allocated": "3.46G", "altroot": "-", "autoexpand": "off", "autoreplace": "off", "bootfs": "rpool/ROOT/openindiana",
"cachefile": "-", "capacity": "6%", "comment": "-", "dedupditto": "0", "dedupratio": "1.00x", "delegation": "on",
"expandsize": "-", "failmode": "wait", "feature@async_destroy": "enabled", "feature@bookmarks": "enabled", "feature@edonr": "enabled",
"feature@embedded_data": "active", "feature@empty_bpobj": "active", "feature@enabled_txg": "active", "feature@extensible_dataset": "enabled",
"feature@filesystem_limits": "enabled", "feature@hole_birth": "active", "feature@large_blocks": "enabled", "feature@lz4_compress": "active",
"feature@multi_vdev_crash_dump": "enabled", "feature@sha512": "enabled", "feature@skein": "enabled", "feature@spacemap_histogram": "active",
"fragmentation": "3%", "free": "46.3G", "freeing": "0", "guid": "15729052870819522408", "health": "ONLINE", "leaked": "0",
"listsnapshots": "off", "name": "rpool", "readonly": "off", "size": "49.8G", "version": "-"}
sample:
"allocated": "3.46G"
"altroot": "-"
"autoexpand": "off"
"autoreplace": "off"
"bootfs": "rpool/ROOT/openindiana"
"cachefile": "-"
"capacity": "6%"
"comment": "-"
"dedupditto": "0"
"dedupratio": "1.00x"
"delegation": "on"
"expandsize": "-"
"failmode": "wait"
"feature@async_destroy": "enabled"
"feature@bookmarks": "enabled"
"feature@edonr": "enabled"
"feature@embedded_data": "active"
"feature@empty_bpobj": "active"
"feature@enabled_txg": "active"
"feature@extensible_dataset": "enabled"
"feature@filesystem_limits": "enabled"
"feature@hole_birth": "active"
"feature@large_blocks": "enabled"
"feature@lz4_compress": "active"
"feature@multi_vdev_crash_dump": "enabled"
"feature@sha512": "enabled"
"feature@skein": "enabled"
"feature@spacemap_histogram": "active"
"fragmentation": "3%"
"free": "46.3G"
"freeing": "0"
"guid": "15729052870819522408"
"health": "ONLINE"
"leaked": "0"
"listsnapshots": "off"
"name": "rpool"
"readonly": "off"
"size": "49.8G"
"version": "-"
name:
description: ZFS pool name.
returned: always