mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-27 02:30:22 -07:00
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:
parent
e938ca5f20
commit
e8f965fbf8
89 changed files with 2085 additions and 1675 deletions
|
@ -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: []
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -182,17 +182,20 @@ role:
|
|||
returned: success
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"CreateIndex": 39,
|
||||
"Description": "",
|
||||
"Hash": "Trt0QJtxVEfvTTIcdTUbIJRr6Dsi6E4EcwSFxx9tCYM=",
|
||||
"ID": "9a300b8d-48db-b720-8544-a37c0f5dafb5",
|
||||
"ModifyIndex": 39,
|
||||
"Name": "foo-role",
|
||||
"Policies": [
|
||||
{"ID": "b1a00172-d7a1-0e66-a12e-7a4045c4b774", "Name": "foo-access"}
|
||||
]
|
||||
}
|
||||
{
|
||||
"CreateIndex": 39,
|
||||
"Description": "",
|
||||
"Hash": "Trt0QJtxVEfvTTIcdTUbIJRr6Dsi6E4EcwSFxx9tCYM=",
|
||||
"ID": "9a300b8d-48db-b720-8544-a37c0f5dafb5",
|
||||
"ModifyIndex": 39,
|
||||
"Name": "foo-role",
|
||||
"Policies": [
|
||||
{
|
||||
"ID": "b1a00172-d7a1-0e66-a12e-7a4045c4b774",
|
||||
"Name": "foo-access"
|
||||
}
|
||||
]
|
||||
}
|
||||
operation:
|
||||
description: The operation performed on the role.
|
||||
returned: changed
|
||||
|
|
|
@ -126,30 +126,31 @@ RETURN = r"""
|
|||
# Returns the downtime JSON dictionary from the API response under the C(downtime) key.
|
||||
# See https://docs.datadoghq.com/api/v1/downtimes/#schedule-a-downtime for more details.
|
||||
downtime:
|
||||
description: The downtime returned by the API.
|
||||
type: dict
|
||||
returned: always
|
||||
sample: {
|
||||
"active": true,
|
||||
"canceled": null,
|
||||
"creator_id": 1445416,
|
||||
"disabled": false,
|
||||
"downtime_type": 2,
|
||||
"end": null,
|
||||
"id": 1055751000,
|
||||
"message": "Downtime for foo:bar",
|
||||
"monitor_id": null,
|
||||
"monitor_tags": [
|
||||
"foo:bar"
|
||||
],
|
||||
"parent_id": null,
|
||||
"recurrence": null,
|
||||
"scope": [
|
||||
"test"
|
||||
],
|
||||
"start": 1607015009,
|
||||
"timezone": "UTC",
|
||||
"updater_id": null
|
||||
description: The downtime returned by the API.
|
||||
type: dict
|
||||
returned: always
|
||||
sample:
|
||||
{
|
||||
"active": true,
|
||||
"canceled": null,
|
||||
"creator_id": 1445416,
|
||||
"disabled": false,
|
||||
"downtime_type": 2,
|
||||
"end": null,
|
||||
"id": 1055751000,
|
||||
"message": "Downtime for foo:bar",
|
||||
"monitor_id": null,
|
||||
"monitor_tags": [
|
||||
"foo:bar"
|
||||
],
|
||||
"parent_id": null,
|
||||
"recurrence": null,
|
||||
"scope": [
|
||||
"test"
|
||||
],
|
||||
"start": 1607015009,
|
||||
"timezone": "UTC",
|
||||
"updater_id": null
|
||||
}
|
||||
"""
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
"""
|
||||
|
||||
|
||||
|
|
|
@ -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"""
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -218,53 +218,54 @@ EXAMPLES = r"""
|
|||
|
||||
RETURN = r"""
|
||||
data:
|
||||
description: Dictionary returned from C(homectl inspect -j).
|
||||
returned: success
|
||||
type: dict
|
||||
sample: {
|
||||
"data": {
|
||||
"binding": {
|
||||
"e9ed2a5b0033427286b228e97c1e8343": {
|
||||
"fileSystemType": "btrfs",
|
||||
"fileSystemUuid": "7bd59491-2812-4642-a492-220c3f0c6c0b",
|
||||
"gid": 60268,
|
||||
"imagePath": "/home/james.home",
|
||||
"luksCipher": "aes",
|
||||
"luksCipherMode": "xts-plain64",
|
||||
"luksUuid": "7f05825a-2c38-47b4-90e1-f21540a35a81",
|
||||
"luksVolumeKeySize": 32,
|
||||
"partitionUuid": "5a906126-d3c8-4234-b230-8f6e9b427b2f",
|
||||
"storage": "luks",
|
||||
"uid": 60268
|
||||
}
|
||||
},
|
||||
description: Dictionary returned from C(homectl inspect -j).
|
||||
returned: success
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"data": {
|
||||
"binding": {
|
||||
"e9ed2a5b0033427286b228e97c1e8343": {
|
||||
"fileSystemType": "btrfs",
|
||||
"fileSystemUuid": "7bd59491-2812-4642-a492-220c3f0c6c0b",
|
||||
"gid": 60268,
|
||||
"imagePath": "/home/james.home",
|
||||
"luksCipher": "aes",
|
||||
"luksCipherMode": "xts-plain64",
|
||||
"luksUuid": "7f05825a-2c38-47b4-90e1-f21540a35a81",
|
||||
"luksVolumeKeySize": 32,
|
||||
"partitionUuid": "5a906126-d3c8-4234-b230-8f6e9b427b2f",
|
||||
"storage": "luks",
|
||||
"uid": 60268
|
||||
}
|
||||
},
|
||||
"diskSize": 3221225472,
|
||||
"disposition": "regular",
|
||||
"lastChangeUSec": 1641941238208691,
|
||||
"lastPasswordChangeUSec": 1641941238208691,
|
||||
"privileged": {
|
||||
"hashedPassword": [
|
||||
"$6$ov9AKni.trf76inT$tTtfSyHgbPTdUsG0CvSSQZXGqFGdHKQ9Pb6e0BTZhDmlgrL/vA5BxrXduBi8u/PCBiYUffGLIkGhApjKMK3bV."
|
||||
]
|
||||
},
|
||||
"signature": [
|
||||
{
|
||||
"data": "o6zVFbymcmk4YTVaY6KPQK23YCp+VkXdGEeniZeV1pzIbFzoaZBvVLPkNKMoPAQbodY5BYfBtuy41prNL78qAg==",
|
||||
"key": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAbs7ELeiEYBxkUQhxZ+5NGyu6J7gTtZtZ5vmIw3jowcY=\n-----END PUBLIC KEY-----\n"
|
||||
}
|
||||
],
|
||||
"status": {
|
||||
"e9ed2a5b0033427286b228e97c1e8343": {
|
||||
"diskCeiling": 21845405696,
|
||||
"diskFloor": 268435456,
|
||||
"diskSize": 3221225472,
|
||||
"disposition": "regular",
|
||||
"lastChangeUSec": 1641941238208691,
|
||||
"lastPasswordChangeUSec": 1641941238208691,
|
||||
"privileged": {
|
||||
"hashedPassword": [
|
||||
"$6$ov9AKni.trf76inT$tTtfSyHgbPTdUsG0CvSSQZXGqFGdHKQ9Pb6e0BTZhDmlgrL/vA5BxrXduBi8u/PCBiYUffGLIkGhApjKMK3bV."
|
||||
]
|
||||
},
|
||||
"signature": [
|
||||
{
|
||||
"data": "o6zVFbymcmk4YTVaY6KPQK23YCp+VkXdGEeniZeV1pzIbFzoaZBvVLPkNKMoPAQbodY5BYfBtuy41prNL78qAg==",
|
||||
"key": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAbs7ELeiEYBxkUQhxZ+5NGyu6J7gTtZtZ5vmIw3jowcY=\n-----END PUBLIC KEY-----\n"
|
||||
}
|
||||
],
|
||||
"status": {
|
||||
"e9ed2a5b0033427286b228e97c1e8343": {
|
||||
"diskCeiling": 21845405696,
|
||||
"diskFloor": 268435456,
|
||||
"diskSize": 3221225472,
|
||||
"service": "io.systemd.Home",
|
||||
"signedLocally": true,
|
||||
"state": "inactive"
|
||||
}
|
||||
},
|
||||
"userName": "james",
|
||||
}
|
||||
"service": "io.systemd.Home",
|
||||
"signedLocally": true,
|
||||
"state": "inactive"
|
||||
}
|
||||
},
|
||||
"userName": "james"
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ EXAMPLES = r"""
|
|||
repo: 'git@github.com:user/repo.git'
|
||||
"""
|
||||
|
||||
RETURN = """# """
|
||||
RETURN = """#"""
|
||||
|
||||
import traceback
|
||||
|
||||
|
|
|
@ -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'"
|
||||
}
|
||||
|
|
|
@ -101,9 +101,7 @@ EXAMPLES = r"""
|
|||
state: absent
|
||||
"""
|
||||
|
||||
RETURN = r"""
|
||||
#only defaults
|
||||
"""
|
||||
RETURN = r"""#"""
|
||||
|
||||
import json
|
||||
|
||||
|
|
|
@ -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"""
|
||||
|
|
|
@ -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]",
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -135,7 +135,7 @@ jobs:
|
|||
"fullname": "test-folder/test-job",
|
||||
"url": "http://localhost:8080/job/test-job/",
|
||||
"color": "blue"
|
||||
},
|
||||
}
|
||||
]
|
||||
"""
|
||||
|
||||
|
|
|
@ -190,17 +190,20 @@ msg:
|
|||
type: str
|
||||
|
||||
end_state:
|
||||
description: Representation of the authentication after module execution.
|
||||
returned: on success
|
||||
type: dict
|
||||
sample: {
|
||||
description: Representation of the authentication after module execution.
|
||||
returned: on success
|
||||
type: dict
|
||||
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,
|
||||
|
|
|
@ -126,11 +126,12 @@ msg:
|
|||
sample: "Client role scope for frontend-client-public has been updated"
|
||||
|
||||
end_state:
|
||||
description: Representation of role role scope after module execution.
|
||||
returned: on success
|
||||
type: list
|
||||
elements: dict
|
||||
sample: [
|
||||
description: Representation of role role scope after module execution.
|
||||
returned: on success
|
||||
type: list
|
||||
elements: dict
|
||||
sample:
|
||||
[
|
||||
{
|
||||
"clientRole": false,
|
||||
"composite": false,
|
||||
|
|
|
@ -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, \
|
||||
|
|
|
@ -354,76 +354,79 @@ msg:
|
|||
sample: "Identity provider my-idp has been created"
|
||||
|
||||
proposed:
|
||||
description: Representation of proposed identity provider.
|
||||
returned: always
|
||||
type: dict
|
||||
sample: {
|
||||
"config": {
|
||||
"authorizationUrl": "https://idp.example.com/auth",
|
||||
"clientAuthMethod": "client_secret_post",
|
||||
"clientId": "my-client",
|
||||
"clientSecret": "secret",
|
||||
"issuer": "https://idp.example.com",
|
||||
"tokenUrl": "https://idp.example.com/token",
|
||||
"userInfoUrl": "https://idp.example.com/userinfo"
|
||||
},
|
||||
"displayName": "OpenID Connect IdP",
|
||||
"providerId": "oidc"
|
||||
description: Representation of proposed identity provider.
|
||||
returned: always
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"config": {
|
||||
"authorizationUrl": "https://idp.example.com/auth",
|
||||
"clientAuthMethod": "client_secret_post",
|
||||
"clientId": "my-client",
|
||||
"clientSecret": "secret",
|
||||
"issuer": "https://idp.example.com",
|
||||
"tokenUrl": "https://idp.example.com/token",
|
||||
"userInfoUrl": "https://idp.example.com/userinfo"
|
||||
},
|
||||
"displayName": "OpenID Connect IdP",
|
||||
"providerId": "oidc"
|
||||
}
|
||||
|
||||
existing:
|
||||
description: Representation of existing identity provider.
|
||||
returned: always
|
||||
type: dict
|
||||
sample: {
|
||||
"addReadTokenRoleOnCreate": false,
|
||||
"alias": "my-idp",
|
||||
"authenticateByDefault": false,
|
||||
"config": {
|
||||
"authorizationUrl": "https://old.example.com/auth",
|
||||
"clientAuthMethod": "client_secret_post",
|
||||
"clientId": "my-client",
|
||||
"clientSecret": "**********",
|
||||
"issuer": "https://old.example.com",
|
||||
"syncMode": "FORCE",
|
||||
"tokenUrl": "https://old.example.com/token",
|
||||
"userInfoUrl": "https://old.example.com/userinfo"
|
||||
},
|
||||
"displayName": "OpenID Connect IdP",
|
||||
"enabled": true,
|
||||
"firstBrokerLoginFlowAlias": "first broker login",
|
||||
"internalId": "4d28d7e3-1b80-45bb-8a30-5822bf55aa1c",
|
||||
"linkOnly": false,
|
||||
"providerId": "oidc",
|
||||
"storeToken": false,
|
||||
"trustEmail": false,
|
||||
description: Representation of existing identity provider.
|
||||
returned: always
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"addReadTokenRoleOnCreate": false,
|
||||
"alias": "my-idp",
|
||||
"authenticateByDefault": false,
|
||||
"config": {
|
||||
"authorizationUrl": "https://old.example.com/auth",
|
||||
"clientAuthMethod": "client_secret_post",
|
||||
"clientId": "my-client",
|
||||
"clientSecret": "**********",
|
||||
"issuer": "https://old.example.com",
|
||||
"syncMode": "FORCE",
|
||||
"tokenUrl": "https://old.example.com/token",
|
||||
"userInfoUrl": "https://old.example.com/userinfo"
|
||||
},
|
||||
"displayName": "OpenID Connect IdP",
|
||||
"enabled": true,
|
||||
"firstBrokerLoginFlowAlias": "first broker login",
|
||||
"internalId": "4d28d7e3-1b80-45bb-8a30-5822bf55aa1c",
|
||||
"linkOnly": false,
|
||||
"providerId": "oidc",
|
||||
"storeToken": false,
|
||||
"trustEmail": false
|
||||
}
|
||||
|
||||
end_state:
|
||||
description: Representation of identity provider after module execution.
|
||||
returned: on success
|
||||
type: dict
|
||||
sample: {
|
||||
"addReadTokenRoleOnCreate": false,
|
||||
"alias": "my-idp",
|
||||
"authenticateByDefault": false,
|
||||
"config": {
|
||||
"authorizationUrl": "https://idp.example.com/auth",
|
||||
"clientAuthMethod": "client_secret_post",
|
||||
"clientId": "my-client",
|
||||
"clientSecret": "**********",
|
||||
"issuer": "https://idp.example.com",
|
||||
"tokenUrl": "https://idp.example.com/token",
|
||||
"userInfoUrl": "https://idp.example.com/userinfo"
|
||||
},
|
||||
"displayName": "OpenID Connect IdP",
|
||||
"enabled": true,
|
||||
"firstBrokerLoginFlowAlias": "first broker login",
|
||||
"internalId": "4d28d7e3-1b80-45bb-8a30-5822bf55aa1c",
|
||||
"linkOnly": false,
|
||||
"providerId": "oidc",
|
||||
"storeToken": false,
|
||||
"trustEmail": false,
|
||||
description: Representation of identity provider after module execution.
|
||||
returned: on success
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"addReadTokenRoleOnCreate": false,
|
||||
"alias": "my-idp",
|
||||
"authenticateByDefault": false,
|
||||
"config": {
|
||||
"authorizationUrl": "https://idp.example.com/auth",
|
||||
"clientAuthMethod": "client_secret_post",
|
||||
"clientId": "my-client",
|
||||
"clientSecret": "**********",
|
||||
"issuer": "https://idp.example.com",
|
||||
"tokenUrl": "https://idp.example.com/token",
|
||||
"userInfoUrl": "https://idp.example.com/userinfo"
|
||||
},
|
||||
"displayName": "OpenID Connect IdP",
|
||||
"enabled": true,
|
||||
"firstBrokerLoginFlowAlias": "first broker login",
|
||||
"internalId": "4d28d7e3-1b80-45bb-8a30-5822bf55aa1c",
|
||||
"linkOnly": false,
|
||||
"providerId": "oidc",
|
||||
"storeToken": false,
|
||||
"trustEmail": false
|
||||
}
|
||||
"""
|
||||
|
||||
|
|
|
@ -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, \
|
||||
|
|
|
@ -598,122 +598,125 @@ msg:
|
|||
sample: "No changes required to user federation 164bb483-c613-482e-80fe-7f1431308799."
|
||||
|
||||
proposed:
|
||||
description: Representation of proposed user federation.
|
||||
returned: always
|
||||
type: dict
|
||||
sample: {
|
||||
"config": {
|
||||
"allowKerberosAuthentication": "false",
|
||||
"authType": "simple",
|
||||
"batchSizeForSync": "1000",
|
||||
"bindCredential": "**********",
|
||||
"bindDn": "cn=directory reader",
|
||||
"cachePolicy": "DEFAULT",
|
||||
"connectionPooling": "true",
|
||||
"connectionUrl": "ldaps://ldap.example.com:636",
|
||||
"debug": "false",
|
||||
"editMode": "READ_ONLY",
|
||||
"enabled": "true",
|
||||
"importEnabled": "true",
|
||||
"pagination": "true",
|
||||
"priority": "0",
|
||||
"rdnLDAPAttribute": "uid",
|
||||
"searchScope": "1",
|
||||
"syncRegistrations": "false",
|
||||
"trustEmail": "false",
|
||||
"useKerberosForPasswordAuthentication": "false",
|
||||
"useTruststoreSpi": "ldapsOnly",
|
||||
"userObjectClasses": "inetOrgPerson, organizationalPerson",
|
||||
"usernameLDAPAttribute": "uid",
|
||||
"usersDn": "ou=Users,dc=example,dc=com",
|
||||
"uuidLDAPAttribute": "entryUUID",
|
||||
"validatePasswordPolicy": "false",
|
||||
"vendor": "other"
|
||||
},
|
||||
"name": "ldap",
|
||||
"providerId": "ldap",
|
||||
"providerType": "org.keycloak.storage.UserStorageProvider"
|
||||
description: Representation of proposed user federation.
|
||||
returned: always
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"config": {
|
||||
"allowKerberosAuthentication": "false",
|
||||
"authType": "simple",
|
||||
"batchSizeForSync": "1000",
|
||||
"bindCredential": "**********",
|
||||
"bindDn": "cn=directory reader",
|
||||
"cachePolicy": "DEFAULT",
|
||||
"connectionPooling": "true",
|
||||
"connectionUrl": "ldaps://ldap.example.com:636",
|
||||
"debug": "false",
|
||||
"editMode": "READ_ONLY",
|
||||
"enabled": "true",
|
||||
"importEnabled": "true",
|
||||
"pagination": "true",
|
||||
"priority": "0",
|
||||
"rdnLDAPAttribute": "uid",
|
||||
"searchScope": "1",
|
||||
"syncRegistrations": "false",
|
||||
"trustEmail": "false",
|
||||
"useKerberosForPasswordAuthentication": "false",
|
||||
"useTruststoreSpi": "ldapsOnly",
|
||||
"userObjectClasses": "inetOrgPerson, organizationalPerson",
|
||||
"usernameLDAPAttribute": "uid",
|
||||
"usersDn": "ou=Users,dc=example,dc=com",
|
||||
"uuidLDAPAttribute": "entryUUID",
|
||||
"validatePasswordPolicy": "false",
|
||||
"vendor": "other"
|
||||
},
|
||||
"name": "ldap",
|
||||
"providerId": "ldap",
|
||||
"providerType": "org.keycloak.storage.UserStorageProvider"
|
||||
}
|
||||
|
||||
existing:
|
||||
description: Representation of existing user federation.
|
||||
returned: always
|
||||
type: dict
|
||||
sample: {
|
||||
"config": {
|
||||
"allowKerberosAuthentication": "false",
|
||||
"authType": "simple",
|
||||
"batchSizeForSync": "1000",
|
||||
"bindCredential": "**********",
|
||||
"bindDn": "cn=directory reader",
|
||||
"cachePolicy": "DEFAULT",
|
||||
"changedSyncPeriod": "-1",
|
||||
"connectionPooling": "true",
|
||||
"connectionUrl": "ldaps://ldap.example.com:636",
|
||||
"debug": "false",
|
||||
"editMode": "READ_ONLY",
|
||||
"enabled": "true",
|
||||
"fullSyncPeriod": "-1",
|
||||
"importEnabled": "true",
|
||||
"pagination": "true",
|
||||
"priority": "0",
|
||||
"rdnLDAPAttribute": "uid",
|
||||
"searchScope": "1",
|
||||
"syncRegistrations": "false",
|
||||
"trustEmail": "false",
|
||||
"useKerberosForPasswordAuthentication": "false",
|
||||
"useTruststoreSpi": "ldapsOnly",
|
||||
"userObjectClasses": "inetOrgPerson, organizationalPerson",
|
||||
"usernameLDAPAttribute": "uid",
|
||||
"usersDn": "ou=Users,dc=example,dc=com",
|
||||
"uuidLDAPAttribute": "entryUUID",
|
||||
"validatePasswordPolicy": "false",
|
||||
"vendor": "other"
|
||||
},
|
||||
"id": "01122837-9047-4ae4-8ca0-6e2e891a765f",
|
||||
"mappers": [
|
||||
{
|
||||
"config": {
|
||||
"always.read.value.from.ldap": "false",
|
||||
"is.mandatory.in.ldap": "false",
|
||||
"ldap.attribute": "mail",
|
||||
"read.only": "true",
|
||||
"user.model.attribute": "email"
|
||||
},
|
||||
"id": "17d60ce2-2d44-4c2c-8b1f-1fba601b9a9f",
|
||||
"name": "email",
|
||||
"parentId": "01122837-9047-4ae4-8ca0-6e2e891a765f",
|
||||
"providerId": "user-attribute-ldap-mapper",
|
||||
"providerType": "org.keycloak.storage.ldap.mappers.LDAPStorageMapper"
|
||||
}
|
||||
],
|
||||
"name": "myfed",
|
||||
"parentId": "myrealm",
|
||||
"providerId": "ldap",
|
||||
"providerType": "org.keycloak.storage.UserStorageProvider"
|
||||
description: Representation of existing user federation.
|
||||
returned: always
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"config": {
|
||||
"allowKerberosAuthentication": "false",
|
||||
"authType": "simple",
|
||||
"batchSizeForSync": "1000",
|
||||
"bindCredential": "**********",
|
||||
"bindDn": "cn=directory reader",
|
||||
"cachePolicy": "DEFAULT",
|
||||
"changedSyncPeriod": "-1",
|
||||
"connectionPooling": "true",
|
||||
"connectionUrl": "ldaps://ldap.example.com:636",
|
||||
"debug": "false",
|
||||
"editMode": "READ_ONLY",
|
||||
"enabled": "true",
|
||||
"fullSyncPeriod": "-1",
|
||||
"importEnabled": "true",
|
||||
"pagination": "true",
|
||||
"priority": "0",
|
||||
"rdnLDAPAttribute": "uid",
|
||||
"searchScope": "1",
|
||||
"syncRegistrations": "false",
|
||||
"trustEmail": "false",
|
||||
"useKerberosForPasswordAuthentication": "false",
|
||||
"useTruststoreSpi": "ldapsOnly",
|
||||
"userObjectClasses": "inetOrgPerson, organizationalPerson",
|
||||
"usernameLDAPAttribute": "uid",
|
||||
"usersDn": "ou=Users,dc=example,dc=com",
|
||||
"uuidLDAPAttribute": "entryUUID",
|
||||
"validatePasswordPolicy": "false",
|
||||
"vendor": "other"
|
||||
},
|
||||
"id": "01122837-9047-4ae4-8ca0-6e2e891a765f",
|
||||
"mappers": [
|
||||
{
|
||||
"config": {
|
||||
"always.read.value.from.ldap": "false",
|
||||
"is.mandatory.in.ldap": "false",
|
||||
"ldap.attribute": "mail",
|
||||
"read.only": "true",
|
||||
"user.model.attribute": "email"
|
||||
},
|
||||
"id": "17d60ce2-2d44-4c2c-8b1f-1fba601b9a9f",
|
||||
"name": "email",
|
||||
"parentId": "01122837-9047-4ae4-8ca0-6e2e891a765f",
|
||||
"providerId": "user-attribute-ldap-mapper",
|
||||
"providerType": "org.keycloak.storage.ldap.mappers.LDAPStorageMapper"
|
||||
}
|
||||
],
|
||||
"name": "myfed",
|
||||
"parentId": "myrealm",
|
||||
"providerId": "ldap",
|
||||
"providerType": "org.keycloak.storage.UserStorageProvider"
|
||||
}
|
||||
|
||||
end_state:
|
||||
description: Representation of user federation after module execution.
|
||||
returned: on success
|
||||
type: dict
|
||||
sample: {
|
||||
"config": {
|
||||
"allowPasswordAuthentication": "false",
|
||||
"cachePolicy": "DEFAULT",
|
||||
"enabled": "true",
|
||||
"kerberosRealm": "EXAMPLE.COM",
|
||||
"keyTab": "/etc/krb5.keytab",
|
||||
"priority": "0",
|
||||
"serverPrincipal": "HTTP/host.example.com@EXAMPLE.COM",
|
||||
"updateProfileFirstLogin": "false"
|
||||
},
|
||||
"id": "cf52ae4f-4471-4435-a0cf-bb620cadc122",
|
||||
"mappers": [],
|
||||
"name": "kerberos",
|
||||
"parentId": "myrealm",
|
||||
"providerId": "kerberos",
|
||||
"providerType": "org.keycloak.storage.UserStorageProvider"
|
||||
description: Representation of user federation after module execution.
|
||||
returned: on success
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"config": {
|
||||
"allowPasswordAuthentication": "false",
|
||||
"cachePolicy": "DEFAULT",
|
||||
"enabled": "true",
|
||||
"kerberosRealm": "EXAMPLE.COM",
|
||||
"keyTab": "/etc/krb5.keytab",
|
||||
"priority": "0",
|
||||
"serverPrincipal": "HTTP/host.example.com@EXAMPLE.COM",
|
||||
"updateProfileFirstLogin": "false"
|
||||
},
|
||||
"id": "cf52ae4f-4471-4435-a0cf-bb620cadc122",
|
||||
"mappers": [],
|
||||
"name": "kerberos",
|
||||
"parentId": "myrealm",
|
||||
"providerId": "kerberos",
|
||||
"providerType": "org.keycloak.storage.UserStorageProvider"
|
||||
}
|
||||
"""
|
||||
|
||||
|
|
|
@ -111,16 +111,16 @@ EXAMPLES = r"""
|
|||
|
||||
RETURN = r"""
|
||||
status:
|
||||
description: Metadata about service status.
|
||||
returned: always
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"current_pid": "-",
|
||||
"current_state": "stopped",
|
||||
"previous_pid": "82636",
|
||||
"previous_state": "running"
|
||||
}
|
||||
description: Metadata about service status.
|
||||
returned: always
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"current_pid": "-",
|
||||
"current_state": "stopped",
|
||||
"previous_pid": "82636",
|
||||
"previous_state": "running"
|
||||
}
|
||||
"""
|
||||
|
||||
import os
|
||||
|
|
|
@ -45,7 +45,7 @@ options:
|
|||
author: "Jimmy Tang (@jcftang) <jimmy_tang@rapid7.com>"
|
||||
"""
|
||||
|
||||
RETURN = """# """
|
||||
RETURN = """#"""
|
||||
|
||||
EXAMPLES = r"""
|
||||
- name: Send a message to logentries
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
@ -89,35 +102,36 @@ EXAMPLES = r"""
|
|||
|
||||
RETURN = r"""
|
||||
manageiq_policies:
|
||||
description:
|
||||
- List current policy_profile and policies for a provider in ManageIQ.
|
||||
returned: always
|
||||
type: dict
|
||||
sample: {
|
||||
"changed": false,
|
||||
"profiles": [
|
||||
description:
|
||||
- List current policy_profile and policies for a provider in ManageIQ.
|
||||
returned: always
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"changed": false,
|
||||
"profiles": [
|
||||
{
|
||||
"policies": [
|
||||
{
|
||||
"policies": [
|
||||
{
|
||||
"active": true,
|
||||
"description": "OpenSCAP",
|
||||
"name": "openscap policy"
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"description": "Analyse incoming container images",
|
||||
"name": "analyse incoming container images"
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"description": "Schedule compliance after smart state analysis",
|
||||
"name": "schedule compliance after smart state analysis"
|
||||
}
|
||||
],
|
||||
"profile_description": "OpenSCAP profile",
|
||||
"profile_name": "openscap profile"
|
||||
"active": true,
|
||||
"description": "OpenSCAP",
|
||||
"name": "openscap policy"
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"description": "Analyse incoming container images",
|
||||
"name": "analyse incoming container images"
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"description": "Schedule compliance after smart state analysis",
|
||||
"name": "schedule compliance after smart state analysis"
|
||||
}
|
||||
]
|
||||
],
|
||||
"profile_description": "OpenSCAP profile",
|
||||
"profile_name": "openscap profile"
|
||||
}
|
||||
]
|
||||
}
|
||||
"""
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -74,31 +74,32 @@ memset_api:
|
|||
description: Details about the firewall group this server is in.
|
||||
returned: always
|
||||
type: dict
|
||||
sample: {
|
||||
"default_outbound_policy": "RETURN",
|
||||
"name": "testyaa-fw1",
|
||||
"nickname": "testyaa cPanel rules",
|
||||
"notes": "",
|
||||
"public": false,
|
||||
"rules": {
|
||||
"51d7db54d39c3544ef7c48baa0b9944f": {
|
||||
"action": "ACCEPT",
|
||||
"comment": "",
|
||||
"dest_ip6s": "any",
|
||||
"dest_ips": "any",
|
||||
"dest_ports": "any",
|
||||
"direction": "Inbound",
|
||||
"ip_version": "any",
|
||||
"ordering": 2,
|
||||
"protocols": "icmp",
|
||||
"rule_group_name": "testyaa-fw1",
|
||||
"rule_id": "51d7db54d39c3544ef7c48baa0b9944f",
|
||||
"source_ip6s": "any",
|
||||
"source_ips": "any",
|
||||
"source_ports": "any"
|
||||
sample:
|
||||
{
|
||||
"default_outbound_policy": "RETURN",
|
||||
"name": "testyaa-fw1",
|
||||
"nickname": "testyaa cPanel rules",
|
||||
"notes": "",
|
||||
"public": false,
|
||||
"rules": {
|
||||
"51d7db54d39c3544ef7c48baa0b9944f": {
|
||||
"action": "ACCEPT",
|
||||
"comment": "",
|
||||
"dest_ip6s": "any",
|
||||
"dest_ips": "any",
|
||||
"dest_ports": "any",
|
||||
"direction": "Inbound",
|
||||
"ip_version": "any",
|
||||
"ordering": 2,
|
||||
"protocols": "icmp",
|
||||
"rule_group_name": "testyaa-fw1",
|
||||
"rule_id": "51d7db54d39c3544ef7c48baa0b9944f",
|
||||
"source_ip6s": "any",
|
||||
"source_ips": "any",
|
||||
"source_ports": "any"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
firewall_type:
|
||||
description: The type of firewall the server has (for example self-managed, managed).
|
||||
returned: always
|
||||
|
@ -118,15 +119,16 @@ memset_api:
|
|||
description: List of dictionaries of all IP addresses assigned to the server.
|
||||
returned: always
|
||||
type: list
|
||||
sample: [
|
||||
{
|
||||
"address": "1.2.3.4",
|
||||
"bytes_in_today": 1000.0,
|
||||
"bytes_in_yesterday": 2000.0,
|
||||
"bytes_out_today": 1000.0,
|
||||
"bytes_out_yesterday": 2000.0
|
||||
}
|
||||
]
|
||||
sample:
|
||||
[
|
||||
{
|
||||
"address": "1.2.3.4",
|
||||
"bytes_in_today": 1000.0,
|
||||
"bytes_in_yesterday": 2000.0,
|
||||
"bytes_out_today": 1000.0,
|
||||
"bytes_out_yesterday": 2000.0
|
||||
}
|
||||
]
|
||||
monitor:
|
||||
description: Whether the server has monitoring enabled.
|
||||
returned: always
|
||||
|
@ -221,10 +223,14 @@ 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.
|
||||
returned: always
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -49,219 +49,219 @@ EXAMPLES = r"""
|
|||
|
||||
RETURN = r"""
|
||||
result:
|
||||
description: List with dictionary contains jobs info
|
||||
returned: success
|
||||
type: list
|
||||
sample: [
|
||||
{
|
||||
description: List with dictionary contains jobs info.
|
||||
returned: success
|
||||
type: list
|
||||
sample:
|
||||
[
|
||||
{
|
||||
"Affinities": null,
|
||||
"AllAtOnce": false,
|
||||
"Constraints": null,
|
||||
"ConsulToken": "",
|
||||
"CreateIndex": 13,
|
||||
"Datacenters": [
|
||||
"dc1"
|
||||
],
|
||||
"Dispatched": false,
|
||||
"ID": "example",
|
||||
"JobModifyIndex": 13,
|
||||
"Meta": null,
|
||||
"ModifyIndex": 13,
|
||||
"Multiregion": null,
|
||||
"Name": "example",
|
||||
"Namespace": "default",
|
||||
"NomadTokenID": "",
|
||||
"ParameterizedJob": null,
|
||||
"ParentID": "",
|
||||
"Payload": null,
|
||||
"Periodic": null,
|
||||
"Priority": 50,
|
||||
"Region": "global",
|
||||
"Spreads": null,
|
||||
"Stable": false,
|
||||
"Status": "pending",
|
||||
"StatusDescription": "",
|
||||
"Stop": false,
|
||||
"SubmitTime": 1602244370615307000,
|
||||
"TaskGroups": [
|
||||
{
|
||||
"Affinities": null,
|
||||
"AllAtOnce": false,
|
||||
"Constraints": null,
|
||||
"ConsulToken": "",
|
||||
"CreateIndex": 13,
|
||||
"Datacenters": [
|
||||
"dc1"
|
||||
],
|
||||
"Dispatched": false,
|
||||
"ID": "example",
|
||||
"JobModifyIndex": 13,
|
||||
"Meta": null,
|
||||
"ModifyIndex": 13,
|
||||
"Multiregion": null,
|
||||
"Name": "example",
|
||||
"Namespace": "default",
|
||||
"NomadTokenID": "",
|
||||
"ParameterizedJob": null,
|
||||
"ParentID": "",
|
||||
"Payload": null,
|
||||
"Periodic": null,
|
||||
"Priority": 50,
|
||||
"Region": "global",
|
||||
"Spreads": null,
|
||||
"Stable": false,
|
||||
"Status": "pending",
|
||||
"StatusDescription": "",
|
||||
"Stop": false,
|
||||
"SubmitTime": 1602244370615307000,
|
||||
"TaskGroups": [
|
||||
{
|
||||
"Affinities": null,
|
||||
"Constraints": null,
|
||||
"Count": 1,
|
||||
"EphemeralDisk": {
|
||||
"Migrate": false,
|
||||
"SizeMB": 300,
|
||||
"Sticky": false
|
||||
},
|
||||
"Meta": null,
|
||||
"Migrate": {
|
||||
"HealthCheck": "checks",
|
||||
"HealthyDeadline": 300000000000,
|
||||
"MaxParallel": 1,
|
||||
"MinHealthyTime": 10000000000
|
||||
},
|
||||
"Name": "cache",
|
||||
"Networks": null,
|
||||
"ReschedulePolicy": {
|
||||
"Attempts": 0,
|
||||
"Delay": 30000000000,
|
||||
"DelayFunction": "exponential",
|
||||
"Interval": 0,
|
||||
"MaxDelay": 3600000000000,
|
||||
"Unlimited": true
|
||||
},
|
||||
"RestartPolicy": {
|
||||
"Attempts": 3,
|
||||
"Delay": 15000000000,
|
||||
"Interval": 1800000000000,
|
||||
"Mode": "fail"
|
||||
},
|
||||
"Scaling": null,
|
||||
"Services": null,
|
||||
"ShutdownDelay": null,
|
||||
"Spreads": null,
|
||||
"StopAfterClientDisconnect": null,
|
||||
"Tasks": [
|
||||
{
|
||||
"Affinities": null,
|
||||
"Artifacts": null,
|
||||
"CSIPluginConfig": null,
|
||||
"Config": {
|
||||
"image": "redis:3.2",
|
||||
"port_map": [
|
||||
{
|
||||
"db": 6379.0
|
||||
}
|
||||
]
|
||||
},
|
||||
"Constraints": null,
|
||||
"DispatchPayload": null,
|
||||
"Driver": "docker",
|
||||
"Env": null,
|
||||
"KillSignal": "",
|
||||
"KillTimeout": 5000000000,
|
||||
"Kind": "",
|
||||
"Leader": false,
|
||||
"Lifecycle": null,
|
||||
"LogConfig": {
|
||||
"MaxFileSizeMB": 10,
|
||||
"MaxFiles": 10
|
||||
},
|
||||
"Meta": null,
|
||||
"Name": "redis",
|
||||
"Resources": {
|
||||
"CPU": 500,
|
||||
"Devices": null,
|
||||
"DiskMB": 0,
|
||||
"IOPS": 0,
|
||||
"MemoryMB": 256,
|
||||
"Networks": [
|
||||
{
|
||||
"CIDR": "",
|
||||
"DNS": null,
|
||||
"Device": "",
|
||||
"DynamicPorts": [
|
||||
{
|
||||
"HostNetwork": "default",
|
||||
"Label": "db",
|
||||
"To": 0,
|
||||
"Value": 0
|
||||
}
|
||||
],
|
||||
"IP": "",
|
||||
"MBits": 10,
|
||||
"Mode": "",
|
||||
"ReservedPorts": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"RestartPolicy": {
|
||||
"Attempts": 3,
|
||||
"Delay": 15000000000,
|
||||
"Interval": 1800000000000,
|
||||
"Mode": "fail"
|
||||
},
|
||||
"Services": [
|
||||
{
|
||||
"AddressMode": "auto",
|
||||
"CanaryMeta": null,
|
||||
"CanaryTags": null,
|
||||
"Checks": [
|
||||
{
|
||||
"AddressMode": "",
|
||||
"Args": null,
|
||||
"CheckRestart": null,
|
||||
"Command": "",
|
||||
"Expose": false,
|
||||
"FailuresBeforeCritical": 0,
|
||||
"GRPCService": "",
|
||||
"GRPCUseTLS": false,
|
||||
"Header": null,
|
||||
"InitialStatus": "",
|
||||
"Interval": 10000000000,
|
||||
"Method": "",
|
||||
"Name": "alive",
|
||||
"Path": "",
|
||||
"PortLabel": "",
|
||||
"Protocol": "",
|
||||
"SuccessBeforePassing": 0,
|
||||
"TLSSkipVerify": false,
|
||||
"TaskName": "",
|
||||
"Timeout": 2000000000,
|
||||
"Type": "tcp"
|
||||
}
|
||||
],
|
||||
"Connect": null,
|
||||
"EnableTagOverride": false,
|
||||
"Meta": null,
|
||||
"Name": "redis-cache",
|
||||
"PortLabel": "db",
|
||||
"Tags": [
|
||||
"global",
|
||||
"cache"
|
||||
],
|
||||
"TaskName": ""
|
||||
}
|
||||
],
|
||||
"ShutdownDelay": 0,
|
||||
"Templates": null,
|
||||
"User": "",
|
||||
"Vault": null,
|
||||
"VolumeMounts": null
|
||||
}
|
||||
],
|
||||
"Update": {
|
||||
"AutoPromote": false,
|
||||
"AutoRevert": false,
|
||||
"Canary": 0,
|
||||
"HealthCheck": "checks",
|
||||
"HealthyDeadline": 180000000000,
|
||||
"MaxParallel": 1,
|
||||
"MinHealthyTime": 10000000000,
|
||||
"ProgressDeadline": 600000000000,
|
||||
"Stagger": 30000000000
|
||||
},
|
||||
"Volumes": null
|
||||
}
|
||||
],
|
||||
"Type": "service",
|
||||
"Update": {
|
||||
"AutoPromote": false,
|
||||
"AutoRevert": false,
|
||||
"Canary": 0,
|
||||
"HealthCheck": "",
|
||||
"HealthyDeadline": 0,
|
||||
"MaxParallel": 1,
|
||||
"MinHealthyTime": 0,
|
||||
"ProgressDeadline": 0,
|
||||
"Stagger": 30000000000
|
||||
"Count": 1,
|
||||
"EphemeralDisk": {
|
||||
"Migrate": false,
|
||||
"SizeMB": 300,
|
||||
"Sticky": false
|
||||
},
|
||||
"VaultNamespace": "",
|
||||
"VaultToken": "",
|
||||
"Version": 0
|
||||
}
|
||||
"Meta": null,
|
||||
"Migrate": {
|
||||
"HealthCheck": "checks",
|
||||
"HealthyDeadline": 300000000000,
|
||||
"MaxParallel": 1,
|
||||
"MinHealthyTime": 10000000000
|
||||
},
|
||||
"Name": "cache",
|
||||
"Networks": null,
|
||||
"ReschedulePolicy": {
|
||||
"Attempts": 0,
|
||||
"Delay": 30000000000,
|
||||
"DelayFunction": "exponential",
|
||||
"Interval": 0,
|
||||
"MaxDelay": 3600000000000,
|
||||
"Unlimited": true
|
||||
},
|
||||
"RestartPolicy": {
|
||||
"Attempts": 3,
|
||||
"Delay": 15000000000,
|
||||
"Interval": 1800000000000,
|
||||
"Mode": "fail"
|
||||
},
|
||||
"Scaling": null,
|
||||
"Services": null,
|
||||
"ShutdownDelay": null,
|
||||
"Spreads": null,
|
||||
"StopAfterClientDisconnect": null,
|
||||
"Tasks": [
|
||||
{
|
||||
"Affinities": null,
|
||||
"Artifacts": null,
|
||||
"CSIPluginConfig": null,
|
||||
"Config": {
|
||||
"image": "redis:3.2",
|
||||
"port_map": [
|
||||
{
|
||||
"db": 6379.0
|
||||
}
|
||||
]
|
||||
},
|
||||
"Constraints": null,
|
||||
"DispatchPayload": null,
|
||||
"Driver": "docker",
|
||||
"Env": null,
|
||||
"KillSignal": "",
|
||||
"KillTimeout": 5000000000,
|
||||
"Kind": "",
|
||||
"Leader": false,
|
||||
"Lifecycle": null,
|
||||
"LogConfig": {
|
||||
"MaxFileSizeMB": 10,
|
||||
"MaxFiles": 10
|
||||
},
|
||||
"Meta": null,
|
||||
"Name": "redis",
|
||||
"Resources": {
|
||||
"CPU": 500,
|
||||
"Devices": null,
|
||||
"DiskMB": 0,
|
||||
"IOPS": 0,
|
||||
"MemoryMB": 256,
|
||||
"Networks": [
|
||||
{
|
||||
"CIDR": "",
|
||||
"DNS": null,
|
||||
"Device": "",
|
||||
"DynamicPorts": [
|
||||
{
|
||||
"HostNetwork": "default",
|
||||
"Label": "db",
|
||||
"To": 0,
|
||||
"Value": 0
|
||||
}
|
||||
],
|
||||
"IP": "",
|
||||
"MBits": 10,
|
||||
"Mode": "",
|
||||
"ReservedPorts": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"RestartPolicy": {
|
||||
"Attempts": 3,
|
||||
"Delay": 15000000000,
|
||||
"Interval": 1800000000000,
|
||||
"Mode": "fail"
|
||||
},
|
||||
"Services": [
|
||||
{
|
||||
"AddressMode": "auto",
|
||||
"CanaryMeta": null,
|
||||
"CanaryTags": null,
|
||||
"Checks": [
|
||||
{
|
||||
"AddressMode": "",
|
||||
"Args": null,
|
||||
"CheckRestart": null,
|
||||
"Command": "",
|
||||
"Expose": false,
|
||||
"FailuresBeforeCritical": 0,
|
||||
"GRPCService": "",
|
||||
"GRPCUseTLS": false,
|
||||
"Header": null,
|
||||
"InitialStatus": "",
|
||||
"Interval": 10000000000,
|
||||
"Method": "",
|
||||
"Name": "alive",
|
||||
"Path": "",
|
||||
"PortLabel": "",
|
||||
"Protocol": "",
|
||||
"SuccessBeforePassing": 0,
|
||||
"TLSSkipVerify": false,
|
||||
"TaskName": "",
|
||||
"Timeout": 2000000000,
|
||||
"Type": "tcp"
|
||||
}
|
||||
],
|
||||
"Connect": null,
|
||||
"EnableTagOverride": false,
|
||||
"Meta": null,
|
||||
"Name": "redis-cache",
|
||||
"PortLabel": "db",
|
||||
"Tags": [
|
||||
"global",
|
||||
"cache"
|
||||
],
|
||||
"TaskName": ""
|
||||
}
|
||||
],
|
||||
"ShutdownDelay": 0,
|
||||
"Templates": null,
|
||||
"User": "",
|
||||
"Vault": null,
|
||||
"VolumeMounts": null
|
||||
}
|
||||
],
|
||||
"Update": {
|
||||
"AutoPromote": false,
|
||||
"AutoRevert": false,
|
||||
"Canary": 0,
|
||||
"HealthCheck": "checks",
|
||||
"HealthyDeadline": 180000000000,
|
||||
"MaxParallel": 1,
|
||||
"MinHealthyTime": 10000000000,
|
||||
"ProgressDeadline": 600000000000,
|
||||
"Stagger": 30000000000
|
||||
},
|
||||
"Volumes": null
|
||||
}
|
||||
],
|
||||
"Type": "service",
|
||||
"Update": {
|
||||
"AutoPromote": false,
|
||||
"AutoRevert": false,
|
||||
"Canary": 0,
|
||||
"HealthCheck": "",
|
||||
"HealthyDeadline": 0,
|
||||
"MaxParallel": 1,
|
||||
"MinHealthyTime": 0,
|
||||
"ProgressDeadline": 0,
|
||||
"Stagger": 30000000000
|
||||
},
|
||||
"VaultNamespace": "",
|
||||
"VaultToken": "",
|
||||
"Version": 0
|
||||
}
|
||||
]
|
||||
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
||||
|
|
|
@ -98,25 +98,26 @@ EXAMPLES = r"""
|
|||
|
||||
RETURN = r"""
|
||||
result:
|
||||
description: Result returned by nomad.
|
||||
returned: always
|
||||
type: dict
|
||||
sample: {
|
||||
"accessor_id": "0d01c55f-8d63-f832-04ff-1866d4eb594e",
|
||||
"create_index": 14,
|
||||
"create_time": "2023-11-12T18:48:34.248857001Z",
|
||||
"expiration_time": null,
|
||||
"expiration_ttl": "",
|
||||
"global": true,
|
||||
"hash": "eSn8H8RVqh8As8WQNnC2vlBRqXy6DECogc5umzX0P30=",
|
||||
"modify_index": 836,
|
||||
"name": "devs",
|
||||
"policies": [
|
||||
"readonly"
|
||||
],
|
||||
"roles": null,
|
||||
"secret_id": "12e878ab-e1f6-e103-b4c4-3b5173bb4cea",
|
||||
"type": "client"
|
||||
description: Result returned by nomad.
|
||||
returned: always
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"accessor_id": "0d01c55f-8d63-f832-04ff-1866d4eb594e",
|
||||
"create_index": 14,
|
||||
"create_time": "2023-11-12T18:48:34.248857001Z",
|
||||
"expiration_time": null,
|
||||
"expiration_ttl": "",
|
||||
"global": true,
|
||||
"hash": "eSn8H8RVqh8As8WQNnC2vlBRqXy6DECogc5umzX0P30=",
|
||||
"modify_index": 836,
|
||||
"name": "devs",
|
||||
"policies": [
|
||||
"readonly"
|
||||
],
|
||||
"roles": null,
|
||||
"secret_id": "12e878ab-e1f6-e103-b4c4-3b5173bb4cea",
|
||||
"type": "client"
|
||||
}
|
||||
"""
|
||||
|
||||
|
|
|
@ -120,24 +120,25 @@ details:
|
|||
elements: str
|
||||
|
||||
status:
|
||||
description: Dictionary containing status information. See OCAPI documentation for details.
|
||||
returned: when supported
|
||||
type: dict
|
||||
sample: {
|
||||
"Details": [
|
||||
"None"
|
||||
],
|
||||
"Health": [
|
||||
{
|
||||
"ID": 5,
|
||||
"Name": "OK"
|
||||
}
|
||||
],
|
||||
"State": {
|
||||
"ID": 16,
|
||||
"Name": "In service"
|
||||
}
|
||||
}
|
||||
description: Dictionary containing status information. See OCAPI documentation for details.
|
||||
returned: when supported
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"Details": [
|
||||
"None"
|
||||
],
|
||||
"Health": [
|
||||
{
|
||||
"ID": 5,
|
||||
"Name": "OK"
|
||||
}
|
||||
],
|
||||
"State": {
|
||||
"ID": 16,
|
||||
"Name": "In service"
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
|
|
@ -78,22 +78,23 @@ EXAMPLES = r"""
|
|||
|
||||
RETURN = r"""
|
||||
vcn:
|
||||
description: Information about the VCN
|
||||
returned: On successful create and update operation
|
||||
type: dict
|
||||
sample: {
|
||||
"cidr_block": "10.0.0.0/16",
|
||||
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",
|
||||
"display_name": "ansible_vcn",
|
||||
"dns_label": "ansiblevcn",
|
||||
"id": "ocid1.vcn.oc1.phx.xxxxxEXAMPLExxxxx",
|
||||
"lifecycle_state": "AVAILABLE",
|
||||
"time_created": "2017-11-13T20:22:40.626000+00:00",
|
||||
"vcn_domain_name": "ansiblevcn.oraclevcn.com"
|
||||
}
|
||||
description: Information about the VCN.
|
||||
returned: On successful create and update operation
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"cidr_block": "10.0.0.0/16",
|
||||
"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",
|
||||
"display_name": "ansible_vcn",
|
||||
"dns_label": "ansiblevcn",
|
||||
"id": "ocid1.vcn.oc1.phx.xxxxxEXAMPLExxxxx",
|
||||
"lifecycle_state": "AVAILABLE",
|
||||
"time_created": "2017-11-13T20:22:40.626000+00:00",
|
||||
"vcn_domain_name": "ansiblevcn.oraclevcn.com"
|
||||
}
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -42,91 +42,91 @@ online_server_info:
|
|||
elements: dict
|
||||
sample:
|
||||
"online_server_info": [
|
||||
{
|
||||
"abuse": "abuse@example.com",
|
||||
"anti_ddos": false,
|
||||
"bmc": {
|
||||
"session_key": null
|
||||
},
|
||||
"boot_mode": "normal",
|
||||
"contacts": {
|
||||
"owner": "foobar",
|
||||
"tech": "foobar"
|
||||
},
|
||||
{
|
||||
"abuse": "abuse@example.com",
|
||||
"anti_ddos": false,
|
||||
"bmc": {
|
||||
"session_key": null
|
||||
},
|
||||
"boot_mode": "normal",
|
||||
"contacts": {
|
||||
"owner": "foobar",
|
||||
"tech": "foobar"
|
||||
},
|
||||
"disks": [
|
||||
{
|
||||
"$ref": "/api/v1/server/hardware/disk/68452"
|
||||
},
|
||||
{
|
||||
"$ref": "/api/v1/server/hardware/disk/68453"
|
||||
}
|
||||
],
|
||||
"drive_arrays": [
|
||||
{
|
||||
"disks": [
|
||||
{
|
||||
"$ref": "/api/v1/server/hardware/disk/68452"
|
||||
},
|
||||
{
|
||||
"$ref": "/api/v1/server/hardware/disk/68453"
|
||||
}
|
||||
{
|
||||
"$ref": "/api/v1/server/hardware/disk/68452"
|
||||
},
|
||||
{
|
||||
"$ref": "/api/v1/server/hardware/disk/68453"
|
||||
}
|
||||
],
|
||||
"drive_arrays": [
|
||||
{
|
||||
"disks": [
|
||||
{
|
||||
"$ref": "/api/v1/server/hardware/disk/68452"
|
||||
},
|
||||
{
|
||||
"$ref": "/api/v1/server/hardware/disk/68453"
|
||||
}
|
||||
],
|
||||
"raid_controller": {
|
||||
"$ref": "/api/v1/server/hardware/raidController/9910"
|
||||
},
|
||||
"raid_level": "RAID1"
|
||||
}
|
||||
],
|
||||
"hardware_watch": true,
|
||||
"hostname": "sd-42",
|
||||
"id": 42,
|
||||
"ip": [
|
||||
{
|
||||
"address": "195.154.172.149",
|
||||
"mac": "28:92:4a:33:5e:c6",
|
||||
"reverse": "195-154-172-149.rev.poneytelecom.eu.",
|
||||
"switch_port_state": "up",
|
||||
"type": "public"
|
||||
},
|
||||
{
|
||||
"address": "10.90.53.212",
|
||||
"mac": "28:92:4a:33:5e:c7",
|
||||
"reverse": null,
|
||||
"switch_port_state": "up",
|
||||
"type": "private"
|
||||
}
|
||||
],
|
||||
"last_reboot": "2018-08-23T08:32:03.000Z",
|
||||
"location": {
|
||||
"block": "A",
|
||||
"datacenter": "DC3",
|
||||
"position": 19,
|
||||
"rack": "A23",
|
||||
"room": "4 4-4"
|
||||
"raid_controller": {
|
||||
"$ref": "/api/v1/server/hardware/raidController/9910"
|
||||
},
|
||||
"network": {
|
||||
"ip": [
|
||||
"195.154.172.149"
|
||||
],
|
||||
"ipfo": [],
|
||||
"private": [
|
||||
"10.90.53.212"
|
||||
]
|
||||
},
|
||||
"offer": "Pro-1-S-SATA",
|
||||
"os": {
|
||||
"name": "FreeBSD",
|
||||
"version": "11.1-RELEASE"
|
||||
},
|
||||
"power": "ON",
|
||||
"proactive_monitoring": false,
|
||||
"raid_controllers": [
|
||||
{
|
||||
"$ref": "/api/v1/server/hardware/raidController/9910"
|
||||
}
|
||||
],
|
||||
"support": "Basic service level"
|
||||
}
|
||||
"raid_level": "RAID1"
|
||||
}
|
||||
],
|
||||
"hardware_watch": true,
|
||||
"hostname": "sd-42",
|
||||
"id": 42,
|
||||
"ip": [
|
||||
{
|
||||
"address": "195.154.172.149",
|
||||
"mac": "28:92:4a:33:5e:c6",
|
||||
"reverse": "195-154-172-149.rev.poneytelecom.eu.",
|
||||
"switch_port_state": "up",
|
||||
"type": "public"
|
||||
},
|
||||
{
|
||||
"address": "10.90.53.212",
|
||||
"mac": "28:92:4a:33:5e:c7",
|
||||
"reverse": null,
|
||||
"switch_port_state": "up",
|
||||
"type": "private"
|
||||
}
|
||||
],
|
||||
"last_reboot": "2018-08-23T08:32:03.000Z",
|
||||
"location": {
|
||||
"block": "A",
|
||||
"datacenter": "DC3",
|
||||
"position": 19,
|
||||
"rack": "A23",
|
||||
"room": "4 4-4"
|
||||
},
|
||||
"network": {
|
||||
"ip": [
|
||||
"195.154.172.149"
|
||||
],
|
||||
"ipfo": [],
|
||||
"private": [
|
||||
"10.90.53.212"
|
||||
]
|
||||
},
|
||||
"offer": "Pro-1-S-SATA",
|
||||
"os": {
|
||||
"name": "FreeBSD",
|
||||
"version": "11.1-RELEASE"
|
||||
},
|
||||
"power": "ON",
|
||||
"proactive_monitoring": false,
|
||||
"raid_controllers": [
|
||||
{
|
||||
"$ref": "/api/v1/server/hardware/raidController/9910"
|
||||
}
|
||||
],
|
||||
"support": "Basic service level"
|
||||
}
|
||||
]
|
||||
"""
|
||||
|
||||
|
|
|
@ -38,12 +38,12 @@ online_user_info:
|
|||
type: dict
|
||||
sample:
|
||||
"online_user_info": {
|
||||
"company": "foobar LLC",
|
||||
"email": "foobar@example.com",
|
||||
"first_name": "foo",
|
||||
"id": 42,
|
||||
"last_name": "bar",
|
||||
"login": "foobar"
|
||||
"company": "foobar LLC",
|
||||
"email": "foobar@example.com",
|
||||
"first_name": "foo",
|
||||
"id": 42,
|
||||
"last_name": "bar",
|
||||
"login": "foobar"
|
||||
}
|
||||
"""
|
||||
|
||||
|
|
|
@ -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
|
||||
'''
|
||||
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
|
||||
|
|
|
@ -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",
|
||||
"public_ipv6": "2604:1380:2:5200::3"
|
||||
}
|
||||
- "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
|
||||
"""
|
||||
|
||||
|
|
|
@ -91,9 +91,10 @@ changed:
|
|||
sample: true
|
||||
returned: always
|
||||
sshkeys:
|
||||
description: Information about sshkeys that were created/removed.
|
||||
type: list
|
||||
sample: [
|
||||
description: Information about sshkeys that were created/removed.
|
||||
type: list
|
||||
sample:
|
||||
[
|
||||
{
|
||||
"fingerprint": "5c:93:74:7c:ed:07:17:62:28:75:79:23:d6:08:93:46",
|
||||
"id": "41d61bd8-3342-428b-a09c-e67bdd18a9b7",
|
||||
|
@ -101,7 +102,7 @@ sshkeys:
|
|||
"label": "mynewkey33"
|
||||
}
|
||||
]
|
||||
returned: always
|
||||
returned: always
|
||||
"""
|
||||
|
||||
import os
|
||||
|
|
|
@ -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",
|
||||
"unit": "gib"
|
||||
},
|
||||
"partitions": [{
|
||||
"begin": 0.0,
|
||||
"end": 1.0,
|
||||
"flags": ["boot", "lvm"],
|
||||
"fstype": "",
|
||||
"name": "",
|
||||
"num": 1,
|
||||
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
|
||||
"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 "
|
||||
}
|
||||
"script": "unit KiB print "
|
||||
"""
|
||||
|
||||
EXAMPLES = r"""
|
||||
|
|
|
@ -60,36 +60,36 @@ packages:
|
|||
type: dict
|
||||
sample:
|
||||
"packages": {
|
||||
"pip": {
|
||||
"Babel": [
|
||||
{
|
||||
"name": "Babel",
|
||||
"source": "pip",
|
||||
"version": "2.6.0"
|
||||
}
|
||||
],
|
||||
"Flask": [
|
||||
{
|
||||
"name": "Flask",
|
||||
"source": "pip",
|
||||
"version": "1.0.2"
|
||||
}
|
||||
],
|
||||
"Flask-SQLAlchemy": [
|
||||
{
|
||||
"name": "Flask-SQLAlchemy",
|
||||
"source": "pip",
|
||||
"version": "2.3.2"
|
||||
}
|
||||
],
|
||||
"Jinja2": [
|
||||
{
|
||||
"name": "Jinja2",
|
||||
"source": "pip",
|
||||
"version": "2.10"
|
||||
}
|
||||
],
|
||||
},
|
||||
"pip": {
|
||||
"Babel": [
|
||||
{
|
||||
"name": "Babel",
|
||||
"source": "pip",
|
||||
"version": "2.6.0"
|
||||
}
|
||||
],
|
||||
"Flask": [
|
||||
{
|
||||
"name": "Flask",
|
||||
"source": "pip",
|
||||
"version": "1.0.2"
|
||||
}
|
||||
],
|
||||
"Flask-SQLAlchemy": [
|
||||
{
|
||||
"name": "Flask-SQLAlchemy",
|
||||
"source": "pip",
|
||||
"version": "2.3.2"
|
||||
}
|
||||
],
|
||||
"Jinja2": [
|
||||
{
|
||||
"name": "Jinja2",
|
||||
"source": "pip",
|
||||
"version": "2.10"
|
||||
}
|
||||
],
|
||||
},
|
||||
}
|
||||
"""
|
||||
|
||||
|
|
|
@ -63,18 +63,18 @@ EXAMPLES = r"""
|
|||
|
||||
RETURN = r"""
|
||||
response:
|
||||
description: JSON representation of a Pritunl Organization.
|
||||
returned: success
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"auth_api": false,
|
||||
"name": "Foo",
|
||||
"auth_token": null,
|
||||
"user_count": 0,
|
||||
"auth_secret": null,
|
||||
"id": "csftwlu6uhralzi2dpmhekz3",
|
||||
}
|
||||
description: JSON representation of a Pritunl Organization.
|
||||
returned: success
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"auth_api": false,
|
||||
"name": "Foo",
|
||||
"auth_token": null,
|
||||
"user_count": 0,
|
||||
"auth_secret": null,
|
||||
"id": "csftwlu6uhralzi2dpmhekz3"
|
||||
}
|
||||
"""
|
||||
|
||||
|
||||
|
|
|
@ -41,37 +41,37 @@ EXAMPLES = r"""
|
|||
|
||||
RETURN = r"""
|
||||
organizations:
|
||||
description: List of Pritunl organizations.
|
||||
returned: success
|
||||
type: list
|
||||
elements: dict
|
||||
sample:
|
||||
[
|
||||
{
|
||||
"auth_api": false,
|
||||
"name": "FooOrg",
|
||||
"auth_token": null,
|
||||
"user_count": 0,
|
||||
"auth_secret": null,
|
||||
"id": "csftwlu6uhralzi2dpmhekz3",
|
||||
},
|
||||
{
|
||||
"auth_api": false,
|
||||
"name": "MyOrg",
|
||||
"auth_token": null,
|
||||
"user_count": 3,
|
||||
"auth_secret": null,
|
||||
"id": "58070daee63f3b2e6e472c36",
|
||||
},
|
||||
{
|
||||
"auth_api": false,
|
||||
"name": "BarOrg",
|
||||
"auth_token": null,
|
||||
"user_count": 0,
|
||||
"auth_secret": null,
|
||||
"id": "v1sncsxxybnsylc8gpqg85pg",
|
||||
}
|
||||
]
|
||||
description: List of Pritunl organizations.
|
||||
returned: success
|
||||
type: list
|
||||
elements: dict
|
||||
sample:
|
||||
[
|
||||
{
|
||||
"auth_api": false,
|
||||
"name": "FooOrg",
|
||||
"auth_token": null,
|
||||
"user_count": 0,
|
||||
"auth_secret": null,
|
||||
"id": "csftwlu6uhralzi2dpmhekz3"
|
||||
},
|
||||
{
|
||||
"auth_api": false,
|
||||
"name": "MyOrg",
|
||||
"auth_token": null,
|
||||
"user_count": 3,
|
||||
"auth_secret": null,
|
||||
"id": "58070daee63f3b2e6e472c36"
|
||||
},
|
||||
{
|
||||
"auth_api": false,
|
||||
"name": "BarOrg",
|
||||
"auth_token": null,
|
||||
"user_count": 0,
|
||||
"auth_secret": null,
|
||||
"id": "v1sncsxxybnsylc8gpqg85pg"
|
||||
}
|
||||
]
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
|
|
@ -115,35 +115,36 @@ EXAMPLES = r"""
|
|||
|
||||
RETURN = r"""
|
||||
response:
|
||||
description: JSON representation of Pritunl Users.
|
||||
returned: success
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"audit": false,
|
||||
"auth_type": "google",
|
||||
"bypass_secondary": false,
|
||||
"client_to_client": false,
|
||||
"disabled": false,
|
||||
"dns_mapping": null,
|
||||
"dns_servers": null,
|
||||
"dns_suffix": null,
|
||||
"email": "foo@bar.com",
|
||||
"gravatar": true,
|
||||
"groups": [
|
||||
"foo", "bar"
|
||||
],
|
||||
"id": "5d070dafe63q3b2e6s472c3b",
|
||||
"name": "foo@acme.com",
|
||||
"network_links": [],
|
||||
"organization": "58070daee6sf342e6e4s2c36",
|
||||
"organization_name": "Acme",
|
||||
"otp_auth": true,
|
||||
"otp_secret": "35H5EJA3XB2$4CWG",
|
||||
"pin": false,
|
||||
"port_forwarding": [],
|
||||
"servers": [],
|
||||
}
|
||||
description: JSON representation of Pritunl Users.
|
||||
returned: success
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"audit": false,
|
||||
"auth_type": "google",
|
||||
"bypass_secondary": false,
|
||||
"client_to_client": false,
|
||||
"disabled": false,
|
||||
"dns_mapping": null,
|
||||
"dns_servers": null,
|
||||
"dns_suffix": null,
|
||||
"email": "foo@bar.com",
|
||||
"gravatar": true,
|
||||
"groups": [
|
||||
"foo",
|
||||
"bar"
|
||||
],
|
||||
"id": "5d070dafe63q3b2e6s472c3b",
|
||||
"name": "foo@acme.com",
|
||||
"network_links": [],
|
||||
"organization": "58070daee6sf342e6e4s2c36",
|
||||
"organization_name": "Acme",
|
||||
"otp_auth": true,
|
||||
"otp_secret": "35H5EJA3XB2$4CWG",
|
||||
"pin": false,
|
||||
"port_forwarding": [],
|
||||
"servers": []
|
||||
}
|
||||
"""
|
||||
|
||||
|
||||
|
|
|
@ -58,38 +58,39 @@ EXAMPLES = r"""
|
|||
|
||||
RETURN = r"""
|
||||
users:
|
||||
description: List of Pritunl users.
|
||||
returned: success
|
||||
type: list
|
||||
elements: dict
|
||||
sample:
|
||||
[
|
||||
{
|
||||
"audit": false,
|
||||
"auth_type": "google",
|
||||
"bypass_secondary": false,
|
||||
"client_to_client": false,
|
||||
"disabled": false,
|
||||
"dns_mapping": null,
|
||||
"dns_servers": null,
|
||||
"dns_suffix": null,
|
||||
"email": "foo@bar.com",
|
||||
"gravatar": true,
|
||||
"groups": [
|
||||
"foo", "bar"
|
||||
],
|
||||
"id": "5d070dafe63q3b2e6s472c3b",
|
||||
"name": "foo@acme.com",
|
||||
"network_links": [],
|
||||
"organization": "58070daee6sf342e6e4s2c36",
|
||||
"organization_name": "Acme",
|
||||
"otp_auth": true,
|
||||
"otp_secret": "35H5EJA3XB2$4CWG",
|
||||
"pin": false,
|
||||
"port_forwarding": [],
|
||||
"servers": [],
|
||||
}
|
||||
]
|
||||
description: List of Pritunl users.
|
||||
returned: success
|
||||
type: list
|
||||
elements: dict
|
||||
sample:
|
||||
[
|
||||
{
|
||||
"audit": false,
|
||||
"auth_type": "google",
|
||||
"bypass_secondary": false,
|
||||
"client_to_client": false,
|
||||
"disabled": false,
|
||||
"dns_mapping": null,
|
||||
"dns_servers": null,
|
||||
"dns_suffix": null,
|
||||
"email": "foo@bar.com",
|
||||
"gravatar": true,
|
||||
"groups": [
|
||||
"foo",
|
||||
"bar"
|
||||
],
|
||||
"id": "5d070dafe63q3b2e6s472c3b",
|
||||
"name": "foo@acme.com",
|
||||
"network_links": [],
|
||||
"organization": "58070daee6sf342e6e4s2c36",
|
||||
"organization_name": "Acme",
|
||||
"otp_auth": true,
|
||||
"otp_secret": "35H5EJA3XB2$4CWG",
|
||||
"pin": false,
|
||||
"port_forwarding": [],
|
||||
"servers": []
|
||||
}
|
||||
]
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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,20 +197,21 @@ cluster:
|
|||
returned: success if O(cluster=true)
|
||||
version_added: 9.1.0
|
||||
type: dict
|
||||
sample: {
|
||||
"cluster_state": ok,
|
||||
"cluster_slots_assigned": 16384,
|
||||
"cluster_slots_ok": 16384,
|
||||
"cluster_slots_pfail": 0,
|
||||
"cluster_slots_fail": 0,
|
||||
"cluster_known_nodes": 6,
|
||||
"cluster_size": 3,
|
||||
"cluster_current_epoch": 6,
|
||||
"cluster_my_epoch": 2,
|
||||
"cluster_stats_messages_sent": 1483972,
|
||||
"cluster_stats_messages_received": 1483968,
|
||||
"total_cluster_links_buffer_limit_exceeded": 0
|
||||
}
|
||||
sample:
|
||||
{
|
||||
"cluster_state": "ok",
|
||||
"cluster_slots_assigned": 16384,
|
||||
"cluster_slots_ok": 16384,
|
||||
"cluster_slots_pfail": 0,
|
||||
"cluster_slots_fail": 0,
|
||||
"cluster_known_nodes": 6,
|
||||
"cluster_size": 3,
|
||||
"cluster_current_epoch": 6,
|
||||
"cluster_my_epoch": 2,
|
||||
"cluster_stats_messages_sent": 1483972,
|
||||
"cluster_stats_messages_received": 1483968,
|
||||
"total_cluster_links_buffer_limit_exceeded": 0
|
||||
}
|
||||
"""
|
||||
|
||||
import traceback
|
||||
|
|
|
@ -153,67 +153,68 @@ options:
|
|||
|
||||
RETURN = r"""
|
||||
vm:
|
||||
description: Returns all of the VMs variables and execution.
|
||||
returned: always
|
||||
type: dict
|
||||
sample: {
|
||||
"boot_order": [
|
||||
"hd",
|
||||
"network"
|
||||
],
|
||||
"changed": true,
|
||||
"changes": [
|
||||
"Delete Protection"
|
||||
],
|
||||
"cluster": "C1",
|
||||
"cpu_share": "0",
|
||||
"created": false,
|
||||
"datacenter": "Default",
|
||||
"del_prot": true,
|
||||
"disks": [
|
||||
{
|
||||
"domain": "ssd-san",
|
||||
"name": "OS",
|
||||
"size": 40
|
||||
}
|
||||
],
|
||||
"eth0": "00:00:5E:00:53:00",
|
||||
"eth1": "00:00:5E:00:53:01",
|
||||
"eth2": "00:00:5E:00:53:02",
|
||||
"exists": true,
|
||||
"failed": false,
|
||||
"ifaces": [
|
||||
{
|
||||
"name": "eth0",
|
||||
"vlan": "Management"
|
||||
},
|
||||
{
|
||||
"name": "eth1",
|
||||
"vlan": "Internal"
|
||||
},
|
||||
{
|
||||
"name": "eth2",
|
||||
"vlan": "External"
|
||||
}
|
||||
],
|
||||
"image": false,
|
||||
"mempol": "0",
|
||||
"msg": [
|
||||
"VM exists",
|
||||
"cpu_share was already set to 0",
|
||||
"VM high availability was already set to True",
|
||||
"The boot order has already been set",
|
||||
"VM delete protection has been set to True",
|
||||
"Disk web2_Disk0_OS already exists",
|
||||
"The VM starting host was already set to host416"
|
||||
],
|
||||
"name": "web2",
|
||||
"type": "server",
|
||||
"uuid": "4ba5a1be-e60b-4368-9533-920f156c817b",
|
||||
"vm_ha": true,
|
||||
"vmcpu": "4",
|
||||
"vmhost": "host416",
|
||||
"vmmem": "16"
|
||||
description: Returns all of the VMs variables and execution.
|
||||
returned: always
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"boot_order": [
|
||||
"hd",
|
||||
"network"
|
||||
],
|
||||
"changed": true,
|
||||
"changes": [
|
||||
"Delete Protection"
|
||||
],
|
||||
"cluster": "C1",
|
||||
"cpu_share": "0",
|
||||
"created": false,
|
||||
"datacenter": "Default",
|
||||
"del_prot": true,
|
||||
"disks": [
|
||||
{
|
||||
"domain": "ssd-san",
|
||||
"name": "OS",
|
||||
"size": 40
|
||||
}
|
||||
],
|
||||
"eth0": "00:00:5E:00:53:00",
|
||||
"eth1": "00:00:5E:00:53:01",
|
||||
"eth2": "00:00:5E:00:53:02",
|
||||
"exists": true,
|
||||
"failed": false,
|
||||
"ifaces": [
|
||||
{
|
||||
"name": "eth0",
|
||||
"vlan": "Management"
|
||||
},
|
||||
{
|
||||
"name": "eth1",
|
||||
"vlan": "Internal"
|
||||
},
|
||||
{
|
||||
"name": "eth2",
|
||||
"vlan": "External"
|
||||
}
|
||||
],
|
||||
"image": false,
|
||||
"mempol": "0",
|
||||
"msg": [
|
||||
"VM exists",
|
||||
"cpu_share was already set to 0",
|
||||
"VM high availability was already set to True",
|
||||
"The boot order has already been set",
|
||||
"VM delete protection has been set to True",
|
||||
"Disk web2_Disk0_OS already exists",
|
||||
"The VM starting host was already set to host416"
|
||||
],
|
||||
"name": "web2",
|
||||
"type": "server",
|
||||
"uuid": "4ba5a1be-e60b-4368-9533-920f156c817b",
|
||||
"vm_ha": true,
|
||||
"vmcpu": "4",
|
||||
"vmhost": "host416",
|
||||
"vmmem": "16"
|
||||
}
|
||||
"""
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -80,46 +80,53 @@ 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: [
|
||||
{
|
||||
"id": 1,
|
||||
"href": "https://rundeck.example.org/api/39/execution/1",
|
||||
"permalink": "https://rundeck.example.org/project/myproject/execution/show/1",
|
||||
"status": "succeeded",
|
||||
"project": "myproject",
|
||||
"executionType": "user",
|
||||
"user": "admin",
|
||||
"date-started": {
|
||||
"unixtime": 1633525515026,
|
||||
"date": "2021-10-06T13:05:15Z"
|
||||
},
|
||||
"date-ended": {
|
||||
"unixtime": 1633525518386,
|
||||
"date": "2021-10-06T13:05:18Z"
|
||||
},
|
||||
"job": {
|
||||
"id": "697af0c4-72d3-4c15-86a3-b5bfe3c6cb6a",
|
||||
"averageDuration": 6381,
|
||||
"name": "Test",
|
||||
"group": "",
|
||||
"project": "myproject",
|
||||
"description": "",
|
||||
"options": {
|
||||
"exit_code": "0"
|
||||
},
|
||||
"href": "https://rundeck.example.org/api/39/job/697af0c4-72d3-4c15-86a3-b5bfe3c6cb6a",
|
||||
"permalink": "https://rundeck.example.org/project/myproject/job/show/697af0c4-72d3-4c15-86a3-b5bfe3c6cb6a"
|
||||
},
|
||||
"description": "Plugin[com.batix.rundeck.plugins.AnsiblePlaybookInlineWorkflowStep, nodeStep: false]",
|
||||
"argstring": "-exit_code 0",
|
||||
"serverUUID": "5b9a1438-fa3a-457e-b254-8f3d70338068"
|
||||
}
|
||||
description: Job executions list.
|
||||
returned: always
|
||||
type: list
|
||||
elements: dict
|
||||
sample:
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"href": "https://rundeck.example.org/api/39/execution/1",
|
||||
"permalink": "https://rundeck.example.org/project/myproject/execution/show/1",
|
||||
"status": "succeeded",
|
||||
"project": "myproject",
|
||||
"executionType": "user",
|
||||
"user": "admin",
|
||||
"date-started": {
|
||||
"unixtime": 1633525515026,
|
||||
"date": "2021-10-06T13:05:15Z"
|
||||
},
|
||||
"date-ended": {
|
||||
"unixtime": 1633525518386,
|
||||
"date": "2021-10-06T13:05:18Z"
|
||||
},
|
||||
"job": {
|
||||
"id": "697af0c4-72d3-4c15-86a3-b5bfe3c6cb6a",
|
||||
"averageDuration": 6381,
|
||||
"name": "Test",
|
||||
"group": "",
|
||||
"project": "myproject",
|
||||
"description": "",
|
||||
"options": {
|
||||
"exit_code": "0"
|
||||
},
|
||||
"href": "https://rundeck.example.org/api/39/job/697af0c4-72d3-4c15-86a3-b5bfe3c6cb6a",
|
||||
"permalink": "https://rundeck.example.org/project/myproject/job/show/697af0c4-72d3-4c15-86a3-b5bfe3c6cb6a"
|
||||
},
|
||||
"description": "Plugin[com.batix.rundeck.plugins.AnsiblePlaybookInlineWorkflowStep, nodeStep: false]",
|
||||
"argstring": "-exit_code 0",
|
||||
"serverUUID": "5b9a1438-fa3a-457e-b254-8f3d70338068"
|
||||
}
|
||||
]
|
||||
"""
|
||||
|
||||
|
|
|
@ -133,48 +133,49 @@ EXAMPLES = r"""
|
|||
|
||||
RETURN = r"""
|
||||
execution_info:
|
||||
description: Rundeck job execution metadata.
|
||||
returned: always
|
||||
type: dict
|
||||
sample: {
|
||||
"msg": "Job execution succeeded!",
|
||||
"execution_info": {
|
||||
"id": 1,
|
||||
"href": "https://rundeck.example.org/api/39/execution/1",
|
||||
"permalink": "https://rundeck.example.org/project/myproject/execution/show/1",
|
||||
"status": "succeeded",
|
||||
"project": "myproject",
|
||||
"executionType": "user",
|
||||
"user": "admin",
|
||||
"date-started": {
|
||||
"unixtime": 1633449020784,
|
||||
"date": "2021-10-05T15:50:20Z"
|
||||
},
|
||||
"date-ended": {
|
||||
"unixtime": 1633449026358,
|
||||
"date": "2021-10-05T15:50:26Z"
|
||||
},
|
||||
"job": {
|
||||
"id": "697af0c4-72d3-4c15-86a3-b5bfe3c6cb6a",
|
||||
"averageDuration": 4917,
|
||||
"name": "Test",
|
||||
"group": "",
|
||||
"project": "myproject",
|
||||
"description": "",
|
||||
"options": {
|
||||
"exit_code": "0"
|
||||
},
|
||||
"href": "https://rundeck.example.org/api/39/job/697af0c4-72d3-4c15-86a3-b5bfe3c6cb6a",
|
||||
"permalink": "https://rundeck.example.org/project/myproject/job/show/697af0c4-72d3-4c15-86a3-b5bfe3c6cb6a"
|
||||
},
|
||||
"description": "sleep 5 && echo 'Test!' && exit ${option.exit_code}",
|
||||
"argstring": "-exit_code 0",
|
||||
"serverUUID": "5b9a1438-fa3a-457e-b254-8f3d70338068",
|
||||
"successfulNodes": [
|
||||
"localhost"
|
||||
],
|
||||
"output": "Test!"
|
||||
}
|
||||
description: Rundeck job execution metadata.
|
||||
returned: always
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"msg": "Job execution succeeded!",
|
||||
"execution_info": {
|
||||
"id": 1,
|
||||
"href": "https://rundeck.example.org/api/39/execution/1",
|
||||
"permalink": "https://rundeck.example.org/project/myproject/execution/show/1",
|
||||
"status": "succeeded",
|
||||
"project": "myproject",
|
||||
"executionType": "user",
|
||||
"user": "admin",
|
||||
"date-started": {
|
||||
"unixtime": 1633449020784,
|
||||
"date": "2021-10-05T15:50:20Z"
|
||||
},
|
||||
"date-ended": {
|
||||
"unixtime": 1633449026358,
|
||||
"date": "2021-10-05T15:50:26Z"
|
||||
},
|
||||
"job": {
|
||||
"id": "697af0c4-72d3-4c15-86a3-b5bfe3c6cb6a",
|
||||
"averageDuration": 4917,
|
||||
"name": "Test",
|
||||
"group": "",
|
||||
"project": "myproject",
|
||||
"description": "",
|
||||
"options": {
|
||||
"exit_code": "0"
|
||||
},
|
||||
"href": "https://rundeck.example.org/api/39/job/697af0c4-72d3-4c15-86a3-b5bfe3c6cb6a",
|
||||
"permalink": "https://rundeck.example.org/project/myproject/job/show/697af0c4-72d3-4c15-86a3-b5bfe3c6cb6a"
|
||||
},
|
||||
"description": "sleep 5 && echo 'Test!' && exit ${option.exit_code}",
|
||||
"argstring": "-exit_code 0",
|
||||
"serverUUID": "5b9a1438-fa3a-457e-b254-8f3d70338068",
|
||||
"successfulNodes": [
|
||||
"localhost"
|
||||
],
|
||||
"output": "Test!"
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
|
|
|
@ -93,26 +93,26 @@ EXAMPLES = r"""
|
|||
|
||||
RETURN = r"""
|
||||
scaleway_compute_private_network:
|
||||
description: Information on the VPC.
|
||||
returned: success when O(state=present)
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"created_at": "2022-01-15T11:11:12.676445Z",
|
||||
"id": "12345678-f1e6-40ec-83e5-12345d67ed89",
|
||||
"name": "network",
|
||||
"organization_id": "a123b4cd-ef5g-678h-90i1-jk2345678l90",
|
||||
"project_id": "a123b4cd-ef5g-678h-90i1-jk2345678l90",
|
||||
"tags": [
|
||||
"tag1",
|
||||
"tag2",
|
||||
"tag3",
|
||||
"tag4",
|
||||
"tag5"
|
||||
],
|
||||
"updated_at": "2022-01-15T11:12:04.624837Z",
|
||||
"zone": "fr-par-2"
|
||||
}
|
||||
description: Information on the VPC.
|
||||
returned: success when O(state=present)
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"created_at": "2022-01-15T11:11:12.676445Z",
|
||||
"id": "12345678-f1e6-40ec-83e5-12345d67ed89",
|
||||
"name": "network",
|
||||
"organization_id": "a123b4cd-ef5g-678h-90i1-jk2345678l90",
|
||||
"project_id": "a123b4cd-ef5g-678h-90i1-jk2345678l90",
|
||||
"tags": [
|
||||
"tag1",
|
||||
"tag2",
|
||||
"tag3",
|
||||
"tag4",
|
||||
"tag5"
|
||||
],
|
||||
"updated_at": "2022-01-15T11:12:04.624837Z",
|
||||
"zone": "fr-par-2"
|
||||
}
|
||||
"""
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, scaleway_argument_spec, Scaleway
|
||||
|
|
|
@ -143,25 +143,26 @@ EXAMPLES = r"""
|
|||
|
||||
RETURN = r"""
|
||||
metadata:
|
||||
description: Backup metadata.
|
||||
returned: when O(state=present), O(state=exported), or O(state=restored)
|
||||
type: dict
|
||||
sample: {
|
||||
"metadata": {
|
||||
"created_at": "2020-08-06T12:42:05.631049Z",
|
||||
"database_name": "my-database",
|
||||
"download_url": null,
|
||||
"download_url_expires_at": null,
|
||||
"expires_at": null,
|
||||
"id": "a15297bd-0c4a-4b4f-8fbb-b36a35b7eb07",
|
||||
"instance_id": "617be32e-6497-4ed7-b4c7-0ee5a81edf49",
|
||||
"instance_name": "my-instance",
|
||||
"name": "backup_name",
|
||||
"region": "fr-par",
|
||||
"size": 600000,
|
||||
"status": "ready",
|
||||
"updated_at": "2020-08-06T12:42:10.581649Z"
|
||||
}
|
||||
description: Backup metadata.
|
||||
returned: when O(state=present), O(state=exported), or O(state=restored)
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"metadata": {
|
||||
"created_at": "2020-08-06T12:42:05.631049Z",
|
||||
"database_name": "my-database",
|
||||
"download_url": null,
|
||||
"download_url_expires_at": null,
|
||||
"expires_at": null,
|
||||
"id": "a15297bd-0c4a-4b4f-8fbb-b36a35b7eb07",
|
||||
"instance_id": "617be32e-6497-4ed7-b4c7-0ee5a81edf49",
|
||||
"instance_name": "my-instance",
|
||||
"name": "backup_name",
|
||||
"region": "fr-par",
|
||||
"size": 600000,
|
||||
"status": "ready",
|
||||
"updated_at": "2020-08-06T12:42:10.581649Z"
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
|
|
|
@ -58,36 +58,36 @@ scaleway_image_info:
|
|||
elements: dict
|
||||
sample:
|
||||
"scaleway_image_info": [
|
||||
{
|
||||
"arch": "x86_64",
|
||||
"creation_date": "2018-07-17T16:18:49.276456+00:00",
|
||||
"default_bootscript": {
|
||||
"architecture": "x86_64",
|
||||
"bootcmdargs": "LINUX_COMMON scaleway boot=local nbd.max_part=16",
|
||||
"default": false,
|
||||
"dtb": "",
|
||||
"id": "15fbd2f7-a0f9-412b-8502-6a44da8d98b8",
|
||||
"initrd": "http://169.254.42.24/initrd/initrd-Linux-x86_64-v3.14.5.gz",
|
||||
"kernel": "http://169.254.42.24/kernel/x86_64-mainline-lts-4.9-4.9.93-rev1/vmlinuz-4.9.93",
|
||||
"organization": "11111111-1111-4111-8111-111111111111",
|
||||
"public": true,
|
||||
"title": "x86_64 mainline 4.9.93 rev1"
|
||||
},
|
||||
"extra_volumes": [],
|
||||
"from_server": null,
|
||||
"id": "00ae4a88-3252-4eda-9feb-5f6b56bf5ef0",
|
||||
"modification_date": "2018-07-17T16:42:06.319315+00:00",
|
||||
"name": "Debian Stretch",
|
||||
"organization": "51b656e3-4865-41e8-adbc-0c45bdd780db",
|
||||
"public": true,
|
||||
"root_volume": {
|
||||
"id": "da32dfbb-c5ff-476d-ae2d-c297dd09b7dd",
|
||||
"name": "snapshot-2a7229dc-d431-4dc5-b66e-95db08b773af-2018-07-17_16:18",
|
||||
"size": 25000000000,
|
||||
"volume_type": "l_ssd"
|
||||
},
|
||||
"state": "available"
|
||||
}
|
||||
{
|
||||
"arch": "x86_64",
|
||||
"creation_date": "2018-07-17T16:18:49.276456+00:00",
|
||||
"default_bootscript": {
|
||||
"architecture": "x86_64",
|
||||
"bootcmdargs": "LINUX_COMMON scaleway boot=local nbd.max_part=16",
|
||||
"default": false,
|
||||
"dtb": "",
|
||||
"id": "15fbd2f7-a0f9-412b-8502-6a44da8d98b8",
|
||||
"initrd": "http://169.254.42.24/initrd/initrd-Linux-x86_64-v3.14.5.gz",
|
||||
"kernel": "http://169.254.42.24/kernel/x86_64-mainline-lts-4.9-4.9.93-rev1/vmlinuz-4.9.93",
|
||||
"organization": "11111111-1111-4111-8111-111111111111",
|
||||
"public": true,
|
||||
"title": "x86_64 mainline 4.9.93 rev1"
|
||||
},
|
||||
"extra_volumes": [],
|
||||
"from_server": null,
|
||||
"id": "00ae4a88-3252-4eda-9feb-5f6b56bf5ef0",
|
||||
"modification_date": "2018-07-17T16:42:06.319315+00:00",
|
||||
"name": "Debian Stretch",
|
||||
"organization": "51b656e3-4865-41e8-adbc-0c45bdd780db",
|
||||
"public": true,
|
||||
"root_volume": {
|
||||
"id": "da32dfbb-c5ff-476d-ae2d-c297dd09b7dd",
|
||||
"name": "snapshot-2a7229dc-d431-4dc5-b66e-95db08b773af-2018-07-17_16:18",
|
||||
"size": 25000000000,
|
||||
"volume_type": "l_ssd"
|
||||
},
|
||||
"state": "available"
|
||||
}
|
||||
]
|
||||
"""
|
||||
|
||||
|
|
|
@ -90,23 +90,24 @@ EXAMPLES = r"""
|
|||
|
||||
RETURN = r"""
|
||||
data:
|
||||
description: This is only present when O(state=present).
|
||||
returned: when O(state=present)
|
||||
type: dict
|
||||
sample: {
|
||||
description: This is only present when O(state=present).
|
||||
returned: when O(state=present)
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"ips": [
|
||||
{
|
||||
"organization": "951df375-e094-4d26-97c1-ba548eeb9c42",
|
||||
"reverse": null,
|
||||
"id": "dd9e8df6-6775-4863-b517-e0b0ee3d7477",
|
||||
"server": {
|
||||
"id": "3f1568ca-b1a2-4e98-b6f7-31a0588157f1",
|
||||
"name": "ansible_tuto-1"
|
||||
},
|
||||
"address": "212.47.232.136"
|
||||
"organization": "951df375-e094-4d26-97c1-ba548eeb9c42",
|
||||
"reverse": null,
|
||||
"id": "dd9e8df6-6775-4863-b517-e0b0ee3d7477",
|
||||
"server": {
|
||||
"id": "3f1568ca-b1a2-4e98-b6f7-31a0588157f1",
|
||||
"name": "ansible_tuto-1"
|
||||
},
|
||||
"address": "212.47.232.136"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
"""
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, scaleway_argument_spec, Scaleway
|
||||
|
|
|
@ -58,16 +58,16 @@ scaleway_ip_info:
|
|||
elements: dict
|
||||
sample:
|
||||
"scaleway_ip_info": [
|
||||
{
|
||||
"address": "163.172.170.243",
|
||||
"id": "ea081794-a581-8899-8451-386ddaf0a451",
|
||||
"organization": "3f709602-5e6c-4619-b80c-e324324324af",
|
||||
"reverse": null,
|
||||
"server": {
|
||||
"id": "12f19bc7-109c-4517-954c-e6b3d0311363",
|
||||
"name": "scw-e0d158"
|
||||
}
|
||||
{
|
||||
"address": "163.172.170.243",
|
||||
"id": "ea081794-a581-8899-8451-386ddaf0a451",
|
||||
"organization": "3f709602-5e6c-4619-b80c-e324324324af",
|
||||
"reverse": null,
|
||||
"server": {
|
||||
"id": "12f19bc7-109c-4517-954c-e6b3d0311363",
|
||||
"name": "scw-e0d158"
|
||||
}
|
||||
}
|
||||
]
|
||||
"""
|
||||
|
||||
|
|
|
@ -45,27 +45,27 @@ scaleway_organization_info:
|
|||
elements: dict
|
||||
sample:
|
||||
"scaleway_organization_info": [
|
||||
{
|
||||
"address_city_name": "Paris",
|
||||
"address_country_code": "FR",
|
||||
"address_line1": "42 Rue de l'univers",
|
||||
"address_line2": null,
|
||||
"address_postal_code": "75042",
|
||||
"address_subdivision_code": "FR-75",
|
||||
"creation_date": "2018-08-06T13:43:28.508575+00:00",
|
||||
"currency": "EUR",
|
||||
"customer_class": "individual",
|
||||
"id": "3f709602-5e6c-4619-b80c-e8432ferewtr",
|
||||
"locale": "fr_FR",
|
||||
"modification_date": "2018-08-06T14:56:41.401685+00:00",
|
||||
"name": "James Bond",
|
||||
"support_id": "694324",
|
||||
"support_level": "basic",
|
||||
"support_pin": "9324",
|
||||
"users": [],
|
||||
"vat_number": null,
|
||||
"warnings": []
|
||||
}
|
||||
{
|
||||
"address_city_name": "Paris",
|
||||
"address_country_code": "FR",
|
||||
"address_line1": "42 Rue de l'univers",
|
||||
"address_line2": null,
|
||||
"address_postal_code": "75042",
|
||||
"address_subdivision_code": "FR-75",
|
||||
"creation_date": "2018-08-06T13:43:28.508575+00:00",
|
||||
"currency": "EUR",
|
||||
"customer_class": "individual",
|
||||
"id": "3f709602-5e6c-4619-b80c-e8432ferewtr",
|
||||
"locale": "fr_FR",
|
||||
"modification_date": "2018-08-06T14:56:41.401685+00:00",
|
||||
"name": "James Bond",
|
||||
"support_id": "694324",
|
||||
"support_level": "basic",
|
||||
"support_pin": "9324",
|
||||
"users": [],
|
||||
"vat_number": null,
|
||||
"warnings": []
|
||||
}
|
||||
]
|
||||
"""
|
||||
|
||||
|
|
|
@ -89,26 +89,26 @@ EXAMPLES = r"""
|
|||
|
||||
RETURN = r"""
|
||||
scaleway_private_network:
|
||||
description: Information on the VPC.
|
||||
returned: success when O(state=present)
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"created_at": "2022-01-15T11:11:12.676445Z",
|
||||
"id": "12345678-f1e6-40ec-83e5-12345d67ed89",
|
||||
"name": "network",
|
||||
"organization_id": "a123b4cd-ef5g-678h-90i1-jk2345678l90",
|
||||
"project_id": "a123b4cd-ef5g-678h-90i1-jk2345678l90",
|
||||
"tags": [
|
||||
"tag1",
|
||||
"tag2",
|
||||
"tag3",
|
||||
"tag4",
|
||||
"tag5"
|
||||
],
|
||||
"updated_at": "2022-01-15T11:12:04.624837Z",
|
||||
"zone": "fr-par-2"
|
||||
}
|
||||
description: Information on the VPC.
|
||||
returned: success when O(state=present)
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"created_at": "2022-01-15T11:11:12.676445Z",
|
||||
"id": "12345678-f1e6-40ec-83e5-12345d67ed89",
|
||||
"name": "network",
|
||||
"organization_id": "a123b4cd-ef5g-678h-90i1-jk2345678l90",
|
||||
"project_id": "a123b4cd-ef5g-678h-90i1-jk2345678l90",
|
||||
"tags": [
|
||||
"tag1",
|
||||
"tag2",
|
||||
"tag3",
|
||||
"tag4",
|
||||
"tag5"
|
||||
],
|
||||
"updated_at": "2022-01-15T11:12:04.624837Z",
|
||||
"zone": "fr-par-2"
|
||||
}
|
||||
"""
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, scaleway_argument_spec, Scaleway
|
||||
|
|
|
@ -109,22 +109,23 @@ EXAMPLES = r"""
|
|||
|
||||
RETURN = r"""
|
||||
data:
|
||||
description: This is only present when O(state=present).
|
||||
returned: when O(state=present)
|
||||
type: dict
|
||||
sample: {
|
||||
"scaleway_security_group": {
|
||||
"description": "my security group description",
|
||||
"enable_default_security": true,
|
||||
"id": "0168fb1f-cc46-4f69-b4be-c95d2a19bcae",
|
||||
"inbound_default_policy": "accept",
|
||||
"name": "security_group",
|
||||
"organization": "43a3b6c8-916f-477b-b7ec-ff1898f5fdd9",
|
||||
"organization_default": false,
|
||||
"outbound_default_policy": "accept",
|
||||
"servers": [],
|
||||
"stateful": false
|
||||
}
|
||||
description: This is only present when O(state=present).
|
||||
returned: when O(state=present)
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"scaleway_security_group": {
|
||||
"description": "my security group description",
|
||||
"enable_default_security": true,
|
||||
"id": "0168fb1f-cc46-4f69-b4be-c95d2a19bcae",
|
||||
"inbound_default_policy": "accept",
|
||||
"name": "security_group",
|
||||
"organization": "43a3b6c8-916f-477b-b7ec-ff1898f5fdd9",
|
||||
"organization_default": false,
|
||||
"outbound_default_policy": "accept",
|
||||
"servers": [],
|
||||
"stateful": false
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
|
|
|
@ -57,20 +57,20 @@ scaleway_security_group_info:
|
|||
elements: dict
|
||||
sample:
|
||||
"scaleway_security_group_info": [
|
||||
{
|
||||
"description": "test-ams",
|
||||
"enable_default_security": true,
|
||||
"id": "7fcde327-8bed-43a6-95c4-6dfbc56d8b51",
|
||||
"name": "test-ams",
|
||||
"organization": "3f709602-5e6c-4619-b80c-e841c89734af",
|
||||
"organization_default": false,
|
||||
"servers": [
|
||||
{
|
||||
"id": "12f19bc7-108c-4517-954c-e6b3d0311363",
|
||||
"name": "scw-e0d158"
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"description": "test-ams",
|
||||
"enable_default_security": true,
|
||||
"id": "7fcde327-8bed-43a6-95c4-6dfbc56d8b51",
|
||||
"name": "test-ams",
|
||||
"organization": "3f709602-5e6c-4619-b80c-e841c89734af",
|
||||
"organization_default": false,
|
||||
"servers": [
|
||||
{
|
||||
"id": "12f19bc7-108c-4517-954c-e6b3d0311363",
|
||||
"name": "scw-e0d158"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
"""
|
||||
|
||||
|
|
|
@ -116,21 +116,22 @@ EXAMPLES = r"""
|
|||
|
||||
RETURN = r"""
|
||||
data:
|
||||
description: This is only present when O(state=present).
|
||||
returned: when O(state=present)
|
||||
type: dict
|
||||
sample: {
|
||||
"scaleway_security_group_rule": {
|
||||
"direction": "inbound",
|
||||
"protocol": "TCP",
|
||||
"ip_range": "0.0.0.0/0",
|
||||
"dest_port_from": 80,
|
||||
"action": "accept",
|
||||
"position": 2,
|
||||
"dest_port_to": null,
|
||||
"editable": null,
|
||||
"id": "10cb0b9a-80f6-4830-abd7-a31cd828b5e9"
|
||||
}
|
||||
description: This is only present when O(state=present).
|
||||
returned: when O(state=present)
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"scaleway_security_group_rule": {
|
||||
"direction": "inbound",
|
||||
"protocol": "TCP",
|
||||
"ip_range": "0.0.0.0/0",
|
||||
"dest_port_from": 80,
|
||||
"action": "accept",
|
||||
"position": 2,
|
||||
"dest_port_to": null,
|
||||
"editable": null,
|
||||
"id": "10cb0b9a-80f6-4830-abd7-a31cd828b5e9"
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
|
|
|
@ -58,102 +58,102 @@ scaleway_server_info:
|
|||
elements: dict
|
||||
sample:
|
||||
"scaleway_server_info": [
|
||||
{
|
||||
"arch": "x86_64",
|
||||
"boot_type": "local",
|
||||
"bootscript": {
|
||||
"architecture": "x86_64",
|
||||
"bootcmdargs": "LINUX_COMMON scaleway boot=local nbd.max_part=16",
|
||||
"default": true,
|
||||
"dtb": "",
|
||||
"id": "b1e68c26-a19c-4eac-9222-498b22bd7ad9",
|
||||
"initrd": "http://169.254.42.24/initrd/initrd-Linux-x86_64-v3.14.5.gz",
|
||||
"kernel": "http://169.254.42.24/kernel/x86_64-mainline-lts-4.4-4.4.127-rev1/vmlinuz-4.4.127",
|
||||
"organization": "11111111-1111-4111-8111-111111111111",
|
||||
"public": true,
|
||||
"title": "x86_64 mainline 4.4.127 rev1"
|
||||
},
|
||||
"commercial_type": "START1-XS",
|
||||
{
|
||||
"arch": "x86_64",
|
||||
"boot_type": "local",
|
||||
"bootscript": {
|
||||
"architecture": "x86_64",
|
||||
"bootcmdargs": "LINUX_COMMON scaleway boot=local nbd.max_part=16",
|
||||
"default": true,
|
||||
"dtb": "",
|
||||
"id": "b1e68c26-a19c-4eac-9222-498b22bd7ad9",
|
||||
"initrd": "http://169.254.42.24/initrd/initrd-Linux-x86_64-v3.14.5.gz",
|
||||
"kernel": "http://169.254.42.24/kernel/x86_64-mainline-lts-4.4-4.4.127-rev1/vmlinuz-4.4.127",
|
||||
"organization": "11111111-1111-4111-8111-111111111111",
|
||||
"public": true,
|
||||
"title": "x86_64 mainline 4.4.127 rev1"
|
||||
},
|
||||
"commercial_type": "START1-XS",
|
||||
"creation_date": "2018-08-14T21:36:56.271545+00:00",
|
||||
"dynamic_ip_required": false,
|
||||
"enable_ipv6": false,
|
||||
"extra_networks": [],
|
||||
"hostname": "scw-e0d256",
|
||||
"id": "12f19bc7-108c-4517-954c-e6b3d0311363",
|
||||
"image": {
|
||||
"arch": "x86_64",
|
||||
"creation_date": "2018-04-26T12:42:21.619844+00:00",
|
||||
"default_bootscript": {
|
||||
"architecture": "x86_64",
|
||||
"bootcmdargs": "LINUX_COMMON scaleway boot=local nbd.max_part=16",
|
||||
"default": true,
|
||||
"dtb": "",
|
||||
"id": "b1e68c26-a19c-4eac-9222-498b22bd7ad9",
|
||||
"initrd": "http://169.254.42.24/initrd/initrd-Linux-x86_64-v3.14.5.gz",
|
||||
"kernel": "http://169.254.42.24/kernel/x86_64-mainline-lts-4.4-4.4.127-rev1/vmlinuz-4.4.127",
|
||||
"organization": "11111111-1111-4111-8111-111111111111",
|
||||
"public": true,
|
||||
"title": "x86_64 mainline 4.4.127 rev1"
|
||||
},
|
||||
"extra_volumes": [],
|
||||
"from_server": null,
|
||||
"id": "67375eb1-f14d-4f02-bb42-6119cecbde51",
|
||||
"modification_date": "2018-04-26T12:49:07.573004+00:00",
|
||||
"name": "Ubuntu Xenial",
|
||||
"organization": "51b656e3-4865-41e8-adbc-0c45bdd780db",
|
||||
"public": true,
|
||||
"root_volume": {
|
||||
"id": "020b8d61-3867-4a0e-84a4-445c5393e05d",
|
||||
"name": "snapshot-87fc282d-f252-4262-adad-86979d9074cf-2018-04-26_12:42",
|
||||
"size": 25000000000,
|
||||
"volume_type": "l_ssd"
|
||||
},
|
||||
"state": "available"
|
||||
},
|
||||
"ipv6": null,
|
||||
"location": {
|
||||
"cluster_id": "5",
|
||||
"hypervisor_id": "412",
|
||||
"node_id": "2",
|
||||
"platform_id": "13",
|
||||
"zone_id": "par1"
|
||||
},
|
||||
"maintenances": [],
|
||||
"modification_date": "2018-08-14T21:37:28.630882+00:00",
|
||||
"name": "scw-e0d256",
|
||||
"organization": "3f709602-5e6c-4619-b80c-e841c89734af",
|
||||
"private_ip": "10.14.222.131",
|
||||
"protected": false,
|
||||
"public_ip": {
|
||||
"address": "163.172.170.197",
|
||||
"dynamic": false,
|
||||
"id": "ea081794-a581-4495-8451-386ddaf0a451"
|
||||
},
|
||||
"security_group": {
|
||||
"id": "a37379d2-d8b0-4668-9cfb-1233fc436f7e",
|
||||
"name": "Default security group"
|
||||
},
|
||||
"state": "running",
|
||||
"state_detail": "booted",
|
||||
"tags": [],
|
||||
"volumes": {
|
||||
"0": {
|
||||
"creation_date": "2018-08-14T21:36:56.271545+00:00",
|
||||
"dynamic_ip_required": false,
|
||||
"enable_ipv6": false,
|
||||
"extra_networks": [],
|
||||
"hostname": "scw-e0d256",
|
||||
"id": "12f19bc7-108c-4517-954c-e6b3d0311363",
|
||||
"image": {
|
||||
"arch": "x86_64",
|
||||
"creation_date": "2018-04-26T12:42:21.619844+00:00",
|
||||
"default_bootscript": {
|
||||
"architecture": "x86_64",
|
||||
"bootcmdargs": "LINUX_COMMON scaleway boot=local nbd.max_part=16",
|
||||
"default": true,
|
||||
"dtb": "",
|
||||
"id": "b1e68c26-a19c-4eac-9222-498b22bd7ad9",
|
||||
"initrd": "http://169.254.42.24/initrd/initrd-Linux-x86_64-v3.14.5.gz",
|
||||
"kernel": "http://169.254.42.24/kernel/x86_64-mainline-lts-4.4-4.4.127-rev1/vmlinuz-4.4.127",
|
||||
"organization": "11111111-1111-4111-8111-111111111111",
|
||||
"public": true,
|
||||
"title": "x86_64 mainline 4.4.127 rev1"
|
||||
},
|
||||
"extra_volumes": [],
|
||||
"from_server": null,
|
||||
"id": "67375eb1-f14d-4f02-bb42-6119cecbde51",
|
||||
"modification_date": "2018-04-26T12:49:07.573004+00:00",
|
||||
"name": "Ubuntu Xenial",
|
||||
"organization": "51b656e3-4865-41e8-adbc-0c45bdd780db",
|
||||
"public": true,
|
||||
"root_volume": {
|
||||
"id": "020b8d61-3867-4a0e-84a4-445c5393e05d",
|
||||
"name": "snapshot-87fc282d-f252-4262-adad-86979d9074cf-2018-04-26_12:42",
|
||||
"size": 25000000000,
|
||||
"volume_type": "l_ssd"
|
||||
},
|
||||
"state": "available"
|
||||
},
|
||||
"ipv6": null,
|
||||
"location": {
|
||||
"cluster_id": "5",
|
||||
"hypervisor_id": "412",
|
||||
"node_id": "2",
|
||||
"platform_id": "13",
|
||||
"zone_id": "par1"
|
||||
},
|
||||
"maintenances": [],
|
||||
"modification_date": "2018-08-14T21:37:28.630882+00:00",
|
||||
"name": "scw-e0d256",
|
||||
"export_uri": "device://dev/vda",
|
||||
"id": "68386fae-4f55-4fbf-aabb-953036a85872",
|
||||
"modification_date": "2018-08-14T21:36:56.271545+00:00",
|
||||
"name": "snapshot-87fc282d-f252-4262-adad-86979d9074cf-2018-04-26_12:42",
|
||||
"organization": "3f709602-5e6c-4619-b80c-e841c89734af",
|
||||
"private_ip": "10.14.222.131",
|
||||
"protected": false,
|
||||
"public_ip": {
|
||||
"address": "163.172.170.197",
|
||||
"dynamic": false,
|
||||
"id": "ea081794-a581-4495-8451-386ddaf0a451"
|
||||
"server": {
|
||||
"id": "12f19bc7-108c-4517-954c-e6b3d0311363",
|
||||
"name": "scw-e0d256"
|
||||
},
|
||||
"security_group": {
|
||||
"id": "a37379d2-d8b0-4668-9cfb-1233fc436f7e",
|
||||
"name": "Default security group"
|
||||
},
|
||||
"state": "running",
|
||||
"state_detail": "booted",
|
||||
"tags": [],
|
||||
"volumes": {
|
||||
"0": {
|
||||
"creation_date": "2018-08-14T21:36:56.271545+00:00",
|
||||
"export_uri": "device://dev/vda",
|
||||
"id": "68386fae-4f55-4fbf-aabb-953036a85872",
|
||||
"modification_date": "2018-08-14T21:36:56.271545+00:00",
|
||||
"name": "snapshot-87fc282d-f252-4262-adad-86979d9074cf-2018-04-26_12:42",
|
||||
"organization": "3f709602-5e6c-4619-b80c-e841c89734af",
|
||||
"server": {
|
||||
"id": "12f19bc7-108c-4517-954c-e6b3d0311363",
|
||||
"name": "scw-e0d256"
|
||||
},
|
||||
"size": 25000000000,
|
||||
"state": "available",
|
||||
"volume_type": "l_ssd"
|
||||
}
|
||||
}
|
||||
"size": 25000000000,
|
||||
"state": "available",
|
||||
"volume_type": "l_ssd"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
"""
|
||||
|
||||
|
|
|
@ -59,18 +59,18 @@ scaleway_snapshot_info:
|
|||
sample:
|
||||
"scaleway_snapshot_info": [
|
||||
{
|
||||
"base_volume": {
|
||||
"id": "68386fae-4f55-4fbf-aabb-953036a85872",
|
||||
"name": "snapshot-87fc282d-f252-4262-adad-86979d9074cf-2018-04-26_12:42"
|
||||
},
|
||||
"creation_date": "2018-08-14T22:34:35.299461+00:00",
|
||||
"id": "b61b4b03-a2e9-4da5-b5ea-e462ac0662d2",
|
||||
"modification_date": "2018-08-14T22:34:54.520560+00:00",
|
||||
"name": "snapshot-87fc282d-f252-4262-adad-86979d9074cf-2018-04-26_12:42 snapshot",
|
||||
"organization": "3f709602-5e6c-4619-b80c-e841c89734af",
|
||||
"size": 25000000000,
|
||||
"state": "available",
|
||||
"volume_type": "l_ssd"
|
||||
"base_volume": {
|
||||
"id": "68386fae-4f55-4fbf-aabb-953036a85872",
|
||||
"name": "snapshot-87fc282d-f252-4262-adad-86979d9074cf-2018-04-26_12:42"
|
||||
},
|
||||
"creation_date": "2018-08-14T22:34:35.299461+00:00",
|
||||
"id": "b61b4b03-a2e9-4da5-b5ea-e462ac0662d2",
|
||||
"modification_date": "2018-08-14T22:34:54.520560+00:00",
|
||||
"name": "snapshot-87fc282d-f252-4262-adad-86979d9074cf-2018-04-26_12:42 snapshot",
|
||||
"organization": "3f709602-5e6c-4619-b80c-e841c89734af",
|
||||
"size": 25000000000,
|
||||
"state": "available",
|
||||
"volume_type": "l_ssd"
|
||||
}
|
||||
]
|
||||
"""
|
||||
|
|
|
@ -71,13 +71,16 @@ EXAMPLES = r"""
|
|||
|
||||
RETURN = r"""
|
||||
data:
|
||||
description: This is only present when O(state=present).
|
||||
returned: when O(state=present)
|
||||
type: dict
|
||||
sample: {
|
||||
"ssh_public_keys": [
|
||||
{"key": "ssh-rsa AAAA...."}
|
||||
]
|
||||
description: This is only present when O(state=present).
|
||||
returned: when O(state=present)
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"ssh_public_keys": [
|
||||
{
|
||||
"key": "ssh-rsa AAAA...."
|
||||
}
|
||||
]
|
||||
}
|
||||
"""
|
||||
|
||||
|
|
|
@ -95,10 +95,11 @@ EXAMPLES = r"""
|
|||
|
||||
RETURN = r"""
|
||||
data:
|
||||
description: This is only present when O(state=present).
|
||||
returned: when O(state=present)
|
||||
type: dict
|
||||
sample: {
|
||||
description: This is only present when O(state=present).
|
||||
returned: when O(state=present)
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"volume": {
|
||||
"export_uri": null,
|
||||
"id": "c675f420-cfeb-48ff-ba2a-9d2a4dbe3fcd",
|
||||
|
@ -107,8 +108,8 @@ data:
|
|||
"server": null,
|
||||
"size": 10000000000,
|
||||
"volume_type": "l_ssd"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.scaleway import SCALEWAY_LOCATION, scaleway_argument_spec, Scaleway
|
||||
|
|
|
@ -58,18 +58,18 @@ scaleway_volume_info:
|
|||
elements: dict
|
||||
sample:
|
||||
"scaleway_volume_info": [
|
||||
{
|
||||
"creation_date": "2018-08-14T20:56:24.949660+00:00",
|
||||
"export_uri": null,
|
||||
"id": "b8d51a06-daeb-4fef-9539-a8aea016c1ba",
|
||||
"modification_date": "2018-08-14T20:56:24.949660+00:00",
|
||||
"name": "test-volume",
|
||||
"organization": "3f709602-5e6c-4619-b80c-e841c89734af",
|
||||
"server": null,
|
||||
"size": 50000000000,
|
||||
"state": "available",
|
||||
"volume_type": "l_ssd"
|
||||
}
|
||||
{
|
||||
"creation_date": "2018-08-14T20:56:24.949660+00:00",
|
||||
"export_uri": null,
|
||||
"id": "b8d51a06-daeb-4fef-9539-a8aea016c1ba",
|
||||
"modification_date": "2018-08-14T20:56:24.949660+00:00",
|
||||
"name": "test-volume",
|
||||
"organization": "3f709602-5e6c-4619-b80c-e841c89734af",
|
||||
"server": null,
|
||||
"size": 50000000000,
|
||||
"state": "available",
|
||||
"volume_type": "l_ssd"
|
||||
}
|
||||
]
|
||||
"""
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,40 +149,41 @@ ansible_interfaces:
|
|||
description: Dictionary of each network interface and its metadata.
|
||||
returned: success
|
||||
type: dict
|
||||
sample: {
|
||||
"1": {
|
||||
"adminstatus": "up",
|
||||
"description": "",
|
||||
"ifindex": "1",
|
||||
"ipv4": [
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"netmask": "255.0.0.0"
|
||||
}
|
||||
],
|
||||
"mac": "",
|
||||
"mtu": "65536",
|
||||
"name": "lo",
|
||||
"operstatus": "up",
|
||||
"speed": "65536"
|
||||
},
|
||||
"2": {
|
||||
"adminstatus": "up",
|
||||
"description": "",
|
||||
"ifindex": "2",
|
||||
"ipv4": [
|
||||
{
|
||||
"address": "192.168.213.128",
|
||||
"netmask": "255.255.255.0"
|
||||
}
|
||||
],
|
||||
"mac": "000a305a52a1",
|
||||
"mtu": "1500",
|
||||
"name": "Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)",
|
||||
"operstatus": "up",
|
||||
"speed": "1500"
|
||||
sample:
|
||||
{
|
||||
"1": {
|
||||
"adminstatus": "up",
|
||||
"description": "",
|
||||
"ifindex": "1",
|
||||
"ipv4": [
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"netmask": "255.0.0.0"
|
||||
}
|
||||
],
|
||||
"mac": "",
|
||||
"mtu": "65536",
|
||||
"name": "lo",
|
||||
"operstatus": "up",
|
||||
"speed": "65536"
|
||||
},
|
||||
"2": {
|
||||
"adminstatus": "up",
|
||||
"description": "",
|
||||
"ifindex": "2",
|
||||
"ipv4": [
|
||||
{
|
||||
"address": "192.168.213.128",
|
||||
"netmask": "255.255.255.0"
|
||||
}
|
||||
],
|
||||
"mac": "000a305a52a1",
|
||||
"mtu": "1500",
|
||||
"name": "Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)",
|
||||
"operstatus": "up",
|
||||
"speed": "1500"
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
import binascii
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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,8 +169,9 @@ units:
|
|||
returned: only for C(.mount) units.
|
||||
type: str
|
||||
sample: /
|
||||
sample: {
|
||||
"-.mount": {
|
||||
sample:
|
||||
{
|
||||
"-.mount": {
|
||||
"activestate": "active",
|
||||
"description": "Root Mount",
|
||||
"loadstate": "loaded",
|
||||
|
@ -181,8 +181,8 @@ units:
|
|||
"type": "xfs",
|
||||
"what": "/dev/mapper/cs-root",
|
||||
"where": "/"
|
||||
},
|
||||
"sshd-keygen.target": {
|
||||
},
|
||||
"sshd-keygen.target": {
|
||||
"activestate": "active",
|
||||
"description": "sshd-keygen.target",
|
||||
"fragmentpath": "/usr/lib/systemd/system/sshd-keygen.target",
|
||||
|
@ -191,8 +191,8 @@ units:
|
|||
"substate": "active",
|
||||
"unitfilepreset": "disabled",
|
||||
"unitfilestate": "static"
|
||||
},
|
||||
"systemd-journald.service": {
|
||||
},
|
||||
"systemd-journald.service": {
|
||||
"activestate": "active",
|
||||
"description": "Journal Service",
|
||||
"execmainpid": "613",
|
||||
|
@ -203,8 +203,8 @@ units:
|
|||
"substate": "running",
|
||||
"unitfilepreset": "disabled",
|
||||
"unitfilestate": "static"
|
||||
},
|
||||
"systemd-journald.socket": {
|
||||
},
|
||||
"systemd-journald.socket": {
|
||||
"activestate": "active",
|
||||
"description": "Journal Socket",
|
||||
"fragmentpath": "/usr/lib/systemd/system/systemd-journald.socket",
|
||||
|
@ -213,9 +213,9 @@ units:
|
|||
"substate": "running",
|
||||
"unitfilepreset": "disabled",
|
||||
"unitfilestate": "static"
|
||||
}
|
||||
}
|
||||
}
|
||||
'''
|
||||
"""
|
||||
|
||||
import fnmatch
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
|
|
@ -119,7 +119,7 @@ EXAMPLES = r"""
|
|||
state: absent
|
||||
"""
|
||||
|
||||
RETURN = """# """
|
||||
RETURN = """#"""
|
||||
import traceback
|
||||
|
||||
from os import getenv
|
||||
|
|
|
@ -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 }}'
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -317,7 +317,7 @@ EXAMPLES = r"""
|
|||
"""
|
||||
|
||||
|
||||
RETURN = """# """
|
||||
RETURN = """#"""
|
||||
|
||||
from datetime import date, timedelta
|
||||
import traceback
|
||||
|
|
|
@ -220,7 +220,7 @@ EXAMPLES = r"""
|
|||
state: absent
|
||||
"""
|
||||
|
||||
RETURN = r"""# """
|
||||
RETURN = r"""#"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
||||
import re
|
||||
|
|
|
@ -61,90 +61,91 @@ EXAMPLES = r"""
|
|||
|
||||
RETURN = r"""
|
||||
instance:
|
||||
description: Metadata about the VM.
|
||||
returned: always
|
||||
type: dict
|
||||
sample: {
|
||||
"cdrom": {
|
||||
"type": "none"
|
||||
description: Metadata about the VM.
|
||||
returned: always
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"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",
|
||||
"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"
|
||||
},
|
||||
{
|
||||
"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": ""
|
||||
{
|
||||
"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": ""
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
|
|
|
@ -88,90 +88,91 @@ EXAMPLES = r"""
|
|||
|
||||
RETURN = r"""
|
||||
instance:
|
||||
description: Metadata about the VM.
|
||||
returned: always
|
||||
type: dict
|
||||
sample: {
|
||||
"cdrom": {
|
||||
"type": "none"
|
||||
description: Metadata about the VM.
|
||||
returned: always
|
||||
type: dict
|
||||
sample:
|
||||
{
|
||||
"cdrom": {
|
||||
"type": "none"
|
||||
},
|
||||
"customization_agent": "native",
|
||||
"disks": [
|
||||
{
|
||||
"name": "windows-template-testing-0",
|
||||
"name_desc": "",
|
||||
"os_device": "xvda",
|
||||
"size": 42949672960,
|
||||
"sr": "Local storage",
|
||||
"sr_uuid": "0af1245e-bdb0-ba33-1446-57a962ec4075",
|
||||
"vbd_userdevice": "0"
|
||||
},
|
||||
"customization_agent": "native",
|
||||
"disks": [
|
||||
{
|
||||
"name": "windows-template-testing-0",
|
||||
"name_desc": "",
|
||||
"os_device": "xvda",
|
||||
"size": 42949672960,
|
||||
"sr": "Local storage",
|
||||
"sr_uuid": "0af1245e-bdb0-ba33-1446-57a962ec4075",
|
||||
"vbd_userdevice": "0"
|
||||
},
|
||||
{
|
||||
"name": "windows-template-testing-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": "windows-template-testing",
|
||||
"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": ""
|
||||
{
|
||||
"name": "windows-template-testing-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": "windows-template-testing",
|
||||
"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": ""
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue