[mem ... n]*.py: normalize docs (#9388)

* [mem ... n]*.py: normalize docs

* Update plugins/modules/netcup_dns.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* netcup_dns: change type of RV(records)

From complex to list of dicts.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
pull/8676/merge
Alexei Znamensky 2024-12-27 01:41:54 +13:00 committed by GitHub
parent a9fca56374
commit 6aadcc72d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
25 changed files with 2245 additions and 2342 deletions

View File

@ -8,18 +8,15 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: memset_dns_reload
author: "Simon Weald (@glitchcrab)"
short_description: Request reload of Memset's DNS infrastructure,
notes:
- DNS reload requests are a best-effort service provided by Memset; these generally
happen every 15 minutes by default, however you can request an immediate reload if
later tasks rely on the records being created. An API key generated via the
Memset customer control panel is required with the following minimum scope -
C(dns.reload). If you wish to poll the job status to wait until the reload has
completed, then C(job.status) is also required.
- DNS reload requests are a best-effort service provided by Memset; these generally happen every 15 minutes by default, however you can request
an immediate reload if later tasks rely on the records being created. An API key generated using the Memset customer control panel is required
with the following minimum scope - C(dns.reload). If you wish to poll the job status to wait until the reload has completed, then C(job.status)
is also required.
description:
- Request a reload of Memset's DNS infrastructure, and optionally poll until it finishes.
extends_documentation_fragment:
@ -39,22 +36,19 @@ options:
default: false
type: bool
description:
- Boolean value, if set will poll the reload job's status and return
when the job has completed (unless the 30 second timeout is reached first).
If the timeout is reached then the task will not be marked as failed, but
stderr will indicate that the polling failed.
'''
- Boolean value, if set will poll the reload job's status and return when the job has completed (unless the 30 second timeout is reached
first). If the timeout is reached then the task will not be marked as failed, but stderr will indicate that the polling failed.
"""
EXAMPLES = '''
EXAMPLES = r"""
- name: Submit DNS reload and poll
community.general.memset_dns_reload:
api_key: 5eb86c9196ab03919abcf03857163741
poll: true
delegate_to: localhost
'''
"""
RETURN = '''
---
RETURN = r"""
memset_api:
description: Raw response from the Memset API.
returned: always
@ -85,7 +79,7 @@ memset_api:
returned: always
type: str
sample: "dns"
'''
"""
from time import sleep

View File

@ -8,14 +8,12 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: memset_memstore_info
author: "Simon Weald (@glitchcrab)"
short_description: Retrieve Memstore product usage information
notes:
- An API key generated via the Memset customer control panel is needed with the
following minimum scope - C(memstore.usage).
- An API key generated using the Memset customer control panel is needed with the following minimum scope - C(memstore.usage).
description:
- Retrieve Memstore product usage information.
extends_documentation_fragment:
@ -35,80 +33,79 @@ options:
required: true
type: str
description:
- The Memstore product name (that is, C(mstestyaa1)).
'''
- The Memstore product name (that is, V(mstestyaa1)).
"""
EXAMPLES = '''
EXAMPLES = r"""
- name: Get usage for mstestyaa1
community.general.memset_memstore_info:
name: mstestyaa1
api_key: 5eb86c9896ab03919abcf03857163741
delegate_to: localhost
'''
"""
RETURN = '''
---
RETURN = r"""
memset_api:
description: Info from the Memset API
description: Info from the Memset API.
returned: always
type: complex
contains:
cdn_bandwidth:
description: Dictionary of CDN bandwidth facts
description: Dictionary of CDN bandwidth facts.
returned: always
type: complex
contains:
bytes_out:
description: Outbound CDN bandwidth for the last 24 hours in bytes
description: Outbound CDN bandwidth for the last 24 hours in bytes.
returned: always
type: int
sample: 1000
requests:
description: Number of requests in the last 24 hours
description: Number of requests in the last 24 hours.
returned: always
type: int
sample: 10
bytes_in:
description: Inbound CDN bandwidth for the last 24 hours in bytes
description: Inbound CDN bandwidth for the last 24 hours in bytes.
returned: always
type: int
sample: 1000
containers:
description: Number of containers
description: Number of containers.
returned: always
type: int
sample: 10
bytes:
description: Space used in bytes
description: Space used in bytes.
returned: always
type: int
sample: 3860997965
objs:
description: Number of objects
description: Number of objects.
returned: always
type: int
sample: 1000
bandwidth:
description: Dictionary of CDN bandwidth facts
description: Dictionary of CDN bandwidth facts.
returned: always
type: complex
contains:
bytes_out:
description: Outbound bandwidth for the last 24 hours in bytes
description: Outbound bandwidth for the last 24 hours in bytes.
returned: always
type: int
sample: 1000
requests:
description: Number of requests in the last 24 hours
description: Number of requests in the last 24 hours.
returned: always
type: int
sample: 10
bytes_in:
description: Inbound bandwidth for the last 24 hours in bytes
description: Inbound bandwidth for the last 24 hours in bytes.
returned: always
type: int
sample: 1000
'''
"""
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.memset import memset_api_call

View File

@ -8,14 +8,12 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: memset_server_info
author: "Simon Weald (@glitchcrab)"
short_description: Retrieve server information
notes:
- An API key generated via the Memset customer control panel is needed with the
following minimum scope - C(server.info).
- An API key generated using the Memset customer control panel is needed with the following minimum scope - C(server.info).
description:
- Retrieve server information.
extends_documentation_fragment:
@ -36,20 +34,19 @@ options:
type: str
description:
- The server product name (that is, C(testyaa1)).
'''
"""
EXAMPLES = '''
EXAMPLES = r"""
- name: Get details for testyaa1
community.general.memset_server_info:
name: testyaa1
api_key: 5eb86c9896ab03919abcf03857163741
delegate_to: localhost
'''
"""
RETURN = '''
---
RETURN = r"""
memset_api:
description: Info from the Memset API
description: Info from the Memset API.
returned: always
type: complex
contains:
@ -59,7 +56,7 @@ memset_api:
type: bool
sample: true
control_panel:
description: Whether the server has a control panel (i.e. cPanel).
description: Whether the server has a control panel (for example cPanel).
returned: always
type: str
sample: 'cpanel'
@ -103,7 +100,7 @@ memset_api:
}
}
firewall_type:
description: The type of firewall the server has (i.e. self-managed, managed).
description: The type of firewall the server has (for example self-managed, managed).
returned: always
type: str
sample: 'managed'
@ -113,7 +110,7 @@ memset_api:
type: str
sample: 'testyaa1.miniserver.com'
ignore_monitoring_off:
description: When true, Memset won't remind the customer that monitoring is disabled.
description: When true, Memset does not remind the customer that monitoring is disabled.
returned: always
type: bool
sample: true
@ -136,7 +133,7 @@ memset_api:
type: bool
sample: true
monitoring_level:
description: The server's monitoring level (i.e. basic).
description: The server's monitoring level (for example V(basic)).
returned: always
type: str
sample: 'basic'
@ -149,7 +146,7 @@ memset_api:
description: The network zone(s) the server is in.
returned: always
type: list
sample: [ 'reading' ]
sample: ['reading']
nickname:
description: Customer-set nickname for the server.
returned: always
@ -196,7 +193,7 @@ memset_api:
type: str
sample: 'GBP'
renewal_price_vat:
description: VAT rate for renewal payments
description: VAT rate for renewal payments.
returned: always
type: str
sample: '20'
@ -206,7 +203,7 @@ memset_api:
type: str
sample: '2013-04-10'
status:
description: Current status of the server (i.e. live, onhold).
description: Current status of the server (for example live, onhold).
returned: always
type: str
sample: 'LIVE'
@ -216,7 +213,7 @@ memset_api:
type: str
sample: 'managed'
type:
description: What this server is (i.e. dedicated)
description: What this server is (for example V(dedicated)).
returned: always
type: str
sample: 'miniserver'
@ -233,7 +230,7 @@ memset_api:
returned: always
type: str
sample: 'basic'
'''
"""
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.memset import memset_api_call

View File

@ -8,16 +8,13 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: memset_zone
author: "Simon Weald (@glitchcrab)"
short_description: Creates and deletes Memset DNS zones
notes:
- Zones can be thought of as a logical group of domains, all of which share the
same DNS records (i.e. they point to the same IP). An API key generated via the
Memset customer control panel is needed with the following minimum scope -
C(dns.zone_create), C(dns.zone_delete), C(dns.zone_list).
- Zones can be thought of as a logical group of domains, all of which share the same DNS records (in other words they point to the same IP). An API key
generated using the Memset customer control panel is needed with the following minimum scope - C(dns.zone_create), C(dns.zone_delete), C(dns.zone_list).
description:
- Manage DNS zones in a Memset account.
extends_documentation_fragment:
@ -33,7 +30,7 @@ options:
description:
- Indicates desired state of resource.
type: str
choices: [ absent, present ]
choices: [absent, present]
api_key:
required: true
description:
@ -42,26 +39,24 @@ options:
name:
required: true
description:
- The zone nickname; usually the same as the main domain. Ensure this
value has at most 250 characters.
- The zone nickname; usually the same as the main domain. Ensure this value has at most 250 characters.
type: str
aliases: [ nickname ]
aliases: [nickname]
ttl:
description:
- The default TTL for all records created in the zone. This must be a
valid int from U(https://www.memset.com/apidocs/methods_dns.html#dns.zone_create).
- The default TTL for all records created in the zone. This must be a valid int from U(https://www.memset.com/apidocs/methods_dns.html#dns.zone_create).
type: int
default: 0
choices: [ 0, 300, 600, 900, 1800, 3600, 7200, 10800, 21600, 43200, 86400 ]
choices: [0, 300, 600, 900, 1800, 3600, 7200, 10800, 21600, 43200, 86400]
force:
required: false
default: false
type: bool
description:
- Forces deletion of a zone and all zone domains/zone records it contains.
'''
"""
EXAMPLES = '''
EXAMPLES = r"""
# Create the zone 'test'
- name: Create zone
community.general.memset_zone:
@ -79,40 +74,40 @@ EXAMPLES = '''
api_key: 5eb86c9196ab03919abcf03857163741
force: true
delegate_to: localhost
'''
"""
RETURN = '''
RETURN = r"""
memset_api:
description: Zone info from the Memset API
description: Zone info from the Memset API.
returned: when state == present
type: complex
contains:
domains:
description: List of domains in this zone
description: List of domains in this zone.
returned: always
type: list
sample: []
id:
description: Zone id
description: Zone id.
returned: always
type: str
sample: "b0bb1ce851aeea6feeb2dc32fe83bf9c"
nickname:
description: Zone name
description: Zone name.
returned: always
type: str
sample: "example.com"
records:
description: List of DNS records for domains in this zone
description: List of DNS records for domains in this zone.
returned: always
type: list
sample: []
ttl:
description: Default TTL for domains in this zone
description: Default TTL for domains in this zone.
returned: always
type: int
sample: 300
'''
"""
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.memset import check_zone

View File

@ -8,18 +8,15 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: memset_zone_domain
author: "Simon Weald (@glitchcrab)"
short_description: Create and delete domains in Memset DNS zones
notes:
- Zone domains can be thought of as a collection of domains, all of which share the
same DNS records (i.e. they point to the same IP). An API key generated via the
Memset customer control panel is needed with the following minimum scope -
C(dns.zone_domain_create), C(dns.zone_domain_delete), C(dns.zone_domain_list).
- Currently this module can only create one domain at a time. Multiple domains should
be created using C(loop).
- Zone domains can be thought of as a collection of domains, all of which share the same DNS records (in other words, they point to the same IP). An API
key generated using the Memset customer control panel is needed with the following minimum scope - C(dns.zone_domain_create), C(dns.zone_domain_delete),
C(dns.zone_domain_list).
- Currently this module can only create one domain at a time. Multiple domains should be created using C(loop).
description:
- Manage DNS zone domains in a Memset account.
extends_documentation_fragment:
@ -35,7 +32,7 @@ options:
description:
- Indicates desired state of resource.
type: str
choices: [ absent, present ]
choices: [absent, present]
api_key:
required: true
description:
@ -52,9 +49,9 @@ options:
description:
- The zone to add the domain to (this must already exist).
type: str
'''
"""
EXAMPLES = '''
EXAMPLES = r"""
# Create the zone domain 'test.com'
- name: Create zone domain
community.general.memset_zone_domain:
@ -63,25 +60,25 @@ EXAMPLES = '''
state: present
api_key: 5eb86c9196ab03919abcf03857163741
delegate_to: localhost
'''
"""
RETURN = '''
RETURN = r"""
memset_api:
description: Domain info from the Memset API
description: Domain info from the Memset API.
returned: when changed or state == present
type: complex
contains:
domain:
description: Domain name
description: Domain name.
returned: always
type: str
sample: "example.com"
id:
description: Domain ID
description: Domain ID.
returned: always
type: str
sample: "b0bb1ce851aeea6feeb2dc32fe83bf9c"
'''
"""
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.memset import get_zone_id

View File

@ -8,18 +8,14 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: memset_zone_record
author: "Simon Weald (@glitchcrab)"
short_description: Create and delete records in Memset DNS zones
notes:
- Zones can be thought of as a logical group of domains, all of which share the
same DNS records (i.e. they point to the same IP). An API key generated via the
Memset customer control panel is needed with the following minimum scope -
C(dns.zone_create), C(dns.zone_delete), C(dns.zone_list).
- Currently this module can only create one DNS record at a time. Multiple records
should be created using C(loop).
- Zones can be thought of as a logical group of domains, all of which share the same DNS records (in other words they point to the same IP). An API key
generated using the Memset customer control panel is needed with the following minimum scope - C(dns.zone_create), C(dns.zone_delete), C(dns.zone_list).
- Currently this module can only create one DNS record at a time. Multiple records should be created using C(loop).
description:
- Manage DNS records in a Memset account.
extends_documentation_fragment:
@ -35,7 +31,7 @@ options:
description:
- Indicates desired state of resource.
type: str
choices: [ absent, present ]
choices: [absent, present]
api_key:
required: true
description:
@ -46,7 +42,7 @@ options:
description:
- The address for this record (can be IP or text string depending on record type).
type: str
aliases: [ ip, data ]
aliases: [ip, data]
priority:
description:
- C(SRV) and C(TXT) record priority, in the range 0 > 999 (inclusive).
@ -62,29 +58,28 @@ options:
required: true
description:
- The type of DNS record to create.
choices: [ A, AAAA, CNAME, MX, NS, SRV, TXT ]
choices: [A, AAAA, CNAME, MX, NS, SRV, TXT]
type: str
relative:
type: bool
default: false
description:
- If set then the current domain is added onto the address field for C(CNAME), C(MX), C(NS)
and C(SRV)record types.
- If set then the current domain is added onto the address field for C(CNAME), C(MX), C(NS) and C(SRV)record types.
ttl:
description:
- The record's TTL in seconds (will inherit zone's TTL if not explicitly set). This must be a
valid int from U(https://www.memset.com/apidocs/methods_dns.html#dns.zone_record_create).
- The record's TTL in seconds (will inherit zone's TTL if not explicitly set). This must be a valid int from
U(https://www.memset.com/apidocs/methods_dns.html#dns.zone_record_create).
default: 0
choices: [ 0, 300, 600, 900, 1800, 3600, 7200, 10800, 21600, 43200, 86400 ]
choices: [0, 300, 600, 900, 1800, 3600, 7200, 10800, 21600, 43200, 86400]
type: int
zone:
required: true
description:
- The name of the zone to which to add the record to.
type: str
'''
"""
EXAMPLES = '''
EXAMPLES = r"""
# Create DNS record for www.domain.com
- name: Create DNS record
community.general.memset_zone_record:
@ -118,11 +113,11 @@ EXAMPLES = '''
address: "{{ item.address }}"
delegate_to: localhost
with_items:
- { 'zone': 'domain1.com', 'type': 'A', 'record': 'www', 'address': '1.2.3.4' }
- { 'zone': 'domain2.com', 'type': 'A', 'record': 'mail', 'address': '4.3.2.1' }
'''
- {'zone': 'domain1.com', 'type': 'A', 'record': 'www', 'address': '1.2.3.4'}
- {'zone': 'domain2.com', 'type': 'A', 'record': 'mail', 'address': '4.3.2.1'}
"""
RETURN = '''
RETURN = r"""
memset_api:
description: Record info from the Memset API.
returned: when state == present
@ -168,7 +163,7 @@ memset_api:
returned: always
type: str
sample: "b0bb1ce851aeea6feeb2dc32fe83bf9c"
'''
"""
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.memset import get_zone_id

View File

@ -10,20 +10,19 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = """
---
DOCUMENTATION = r"""
author: Kairo Araujo (@kairoaraujo)
module: mksysb
short_description: Generates AIX mksysb rootvg backups
description:
- This module manages a basic AIX mksysb (image) of rootvg.
- This module manages a basic AIX mksysb (image) of rootvg.
seealso:
- name: C(mksysb) command manual page
- name: C(mksysb) command manual page
description: Manual page for the command.
link: https://www.ibm.com/docs/en/aix/7.3?topic=m-mksysb-command
extends_documentation_fragment:
- community.general.attributes
- community.general.attributes
attributes:
check_mode:
support: full
@ -63,7 +62,7 @@ options:
name:
type: str
description:
- Backup name
- Backup name.
required: true
new_image_data:
description:
@ -87,8 +86,7 @@ options:
default: false
"""
EXAMPLES = """
---
EXAMPLES = r"""
- name: Running a backup image mksysb
community.general.mksysb:
name: myserver
@ -97,8 +95,7 @@ EXAMPLES = """
exclude_wpar_files: true
"""
RETURN = """
---
RETURN = r"""
changed:
description: Return changed for mksysb actions as true or false.
returned: always

View File

@ -8,8 +8,7 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: modprobe
short_description: Load or unload kernel modules
author:
@ -35,7 +34,7 @@ options:
type: str
description:
- Whether the module should be present or absent.
choices: [ absent, present ]
choices: [absent, present]
default: present
params:
type: str
@ -44,23 +43,23 @@ options:
default: ''
persistent:
type: str
choices: [ disabled, absent, present ]
choices: [disabled, absent, present]
default: disabled
version_added: 7.0.0
description:
- Persistency between reboots for configured module.
- This option creates files in C(/etc/modules-load.d/) and C(/etc/modprobe.d/) that make your module configuration persistent during reboots.
- If V(present), adds module name to C(/etc/modules-load.d/) and params to C(/etc/modprobe.d/) so the module will be loaded on next reboot.
- If V(absent), will comment out module name from C(/etc/modules-load.d/) and comment out params from C(/etc/modprobe.d/) so the module will not be
loaded on next reboot.
- If V(absent), will comment out module name from C(/etc/modules-load.d/) and comment out params from C(/etc/modprobe.d/) so the module
will not be loaded on next reboot.
- If V(disabled), will not touch anything and leave C(/etc/modules-load.d/) and C(/etc/modprobe.d/) as it is.
- Note that it is usually a better idea to rely on the automatic module loading by PCI IDs, USB IDs, DMI IDs or similar triggers encoded in the
kernel modules themselves instead of configuration like this.
- Note that it is usually a better idea to rely on the automatic module loading by PCI IDs, USB IDs, DMI IDs or similar triggers encoded
in the kernel modules themselves instead of configuration like this.
- In fact, most modern kernel modules are prepared for automatic loading already.
- "B(Note:) This option works only with distributions that use C(systemd) when set to values other than V(disabled)."
'''
- B(Note:) This option works only with distributions that use C(systemd) when set to values other than V(disabled).
"""
EXAMPLES = '''
EXAMPLES = r"""
- name: Add the 802.1q module
community.general.modprobe:
name: 8021q
@ -78,7 +77,7 @@ EXAMPLES = '''
state: present
params: 'numdummies=2'
persistent: present
'''
"""
import os.path
import platform

View File

@ -9,12 +9,11 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: monit
short_description: Manage the state of a program monitored via Monit
short_description: Manage the state of a program monitored using Monit
description:
- Manage the state of a program monitored via Monit.
- Manage the state of a program monitored using Monit.
extends_documentation_fragment:
- community.general.attributes
attributes:
@ -32,26 +31,25 @@ options:
description:
- The state of service.
required: true
choices: [ "present", "started", "stopped", "restarted", "monitored", "unmonitored", "reloaded" ]
choices: ["present", "started", "stopped", "restarted", "monitored", "unmonitored", "reloaded"]
type: str
timeout:
description:
- If there are pending actions for the service monitored by monit, then Ansible will check
for up to this many seconds to verify the requested action has been performed.
Ansible will sleep for five seconds between each check.
- If there are pending actions for the service monitored by monit, then Ansible will check for up to this many seconds to verify the requested
action has been performed. Ansible will sleep for five seconds between each check.
default: 300
type: int
author:
- Darryl Stoflet (@dstoflet)
- Simon Kelly (@snopoke)
'''
"""
EXAMPLES = '''
EXAMPLES = r"""
- name: Manage the state of program httpd to be in started state
community.general.monit:
name: httpd
state: started
'''
"""
import time
import re

View File

@ -9,8 +9,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: mqtt
short_description: Publish a message on an MQTT topic for the IoT
description:
@ -26,12 +25,12 @@ options:
server:
type: str
description:
- MQTT broker address/name
- MQTT broker address/name.
default: localhost
port:
type: int
description:
- MQTT broker port number
- MQTT broker port number.
default: 1883
username:
type: str
@ -44,76 +43,67 @@ options:
client_id:
type: str
description:
- MQTT client identifier
- MQTT client identifier.
- If not specified, a value C(hostname + pid) will be used.
topic:
type: str
description:
- MQTT topic name
- MQTT topic name.
required: true
payload:
type: str
description:
- Payload. The special string V("None") may be used to send a NULL
(that is, empty) payload which is useful to simply notify with the O(topic)
- Payload. The special string V("None") may be used to send a NULL (that is, empty) payload which is useful to simply notify with the O(topic)
or to clear previously retained messages.
required: true
qos:
type: str
description:
- QoS (Quality of Service)
- QoS (Quality of Service).
default: "0"
choices: [ "0", "1", "2" ]
choices: ["0", "1", "2"]
retain:
description:
- Setting this flag causes the broker to retain (i.e. keep) the message so that
applications that subsequently subscribe to the topic can received the last
retained message immediately.
- Setting this flag causes the broker to retain (in other words keep) the message so that applications that subsequently subscribe to the topic can
received the last retained message immediately.
type: bool
default: false
ca_cert:
type: path
description:
- The path to the Certificate Authority certificate files that are to be
treated as trusted by this client. If this is the only option given
then the client will operate in a similar manner to a web browser. That
is to say it will require the broker to have a certificate signed by the
Certificate Authorities in ca_certs and will communicate using TLS v1,
but will not attempt any form of authentication. This provides basic
network encryption but may not be sufficient depending on how the broker
is configured.
aliases: [ ca_certs ]
- The path to the Certificate Authority certificate files that are to be treated as trusted by this client. If this is the only option given
then the client will operate in a similar manner to a web browser. That is to say it will require the broker to have a certificate signed
by the Certificate Authorities in ca_certs and will communicate using TLS v1, but will not attempt any form of authentication. This provides
basic network encryption but may not be sufficient depending on how the broker is configured.
aliases: [ca_certs]
client_cert:
type: path
description:
- The path pointing to the PEM encoded client certificate. If this is not
None it will be used as client information for TLS based
authentication. Support for this feature is broker dependent.
aliases: [ certfile ]
- The path pointing to the PEM encoded client certificate. If this is not None it will be used as client information for TLS based authentication.
Support for this feature is broker dependent.
aliases: [certfile]
client_key:
type: path
description:
- The path pointing to the PEM encoded client private key. If this is not
None it will be used as client information for TLS based
authentication. Support for this feature is broker dependent.
aliases: [ keyfile ]
- The path pointing to the PEM encoded client private key. If this is not None it will be used as client information for TLS based authentication.
Support for this feature is broker dependent.
aliases: [keyfile]
tls_version:
description:
- Specifies the version of the SSL/TLS protocol to be used.
- By default (if the python version supports it) the highest TLS version is
detected. If unavailable, TLS v1 is used.
- By default (if the python version supports it) the highest TLS version is detected. If unavailable, TLS v1 is used.
type: str
choices:
- tlsv1.1
- tlsv1.2
requirements: [ mosquitto ]
requirements: [mosquitto]
notes:
- This module requires a connection to an MQTT broker such as Mosquitto
U(http://mosquitto.org) and the I(Paho) C(mqtt) Python client (U(https://pypi.org/project/paho-mqtt/)).
- This module requires a connection to an MQTT broker such as Mosquitto U(http://mosquitto.org) and the I(Paho) C(mqtt)
Python client (U(https://pypi.org/project/paho-mqtt/)).
author: "Jan-Piet Mens (@jpmens)"
'''
"""
EXAMPLES = '''
EXAMPLES = r"""
- name: Publish a message on an MQTT topic
community.general.mqtt:
topic: 'service/ansible/{{ ansible_hostname }}'
@ -122,7 +112,7 @@ EXAMPLES = '''
retain: false
client_id: ans001
delegate_to: localhost
'''
"""
# ===========================================
# MQTT module support methods.

View File

@ -10,8 +10,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: mssql_db
short_description: Add or remove MSSQL databases from a remote host
description:
@ -26,56 +25,54 @@ attributes:
options:
name:
description:
- name of the database to add or remove
- Name of the database to add or remove.
required: true
aliases: [ db ]
aliases: [db]
type: str
login_user:
description:
- The username used to authenticate with
- The username used to authenticate with.
type: str
default: ''
login_password:
description:
- The password used to authenticate with
- The password used to authenticate with.
type: str
default: ''
login_host:
description:
- Host running the database
- Host running the database.
type: str
required: true
login_port:
description:
- Port of the MSSQL server. Requires login_host be defined as other than localhost if login_port is used
- Port of the MSSQL server. Requires login_host be defined as other than localhost if login_port is used.
default: '1433'
type: str
state:
description:
- The database state
- The database state.
default: present
choices: [ "present", "absent", "import" ]
choices: ["present", "absent", "import"]
type: str
target:
description:
- Location, on the remote host, of the dump file to read from or write to. Uncompressed SQL
files (C(.sql)) files are supported.
- Location, on the remote host, of the dump file to read from or write to. Uncompressed SQL files (C(.sql)) files are supported.
type: str
autocommit:
description:
- Automatically commit the change only if the import succeed. Sometimes it is necessary to use autocommit=true, since some content can't be changed
within a transaction.
- Automatically commit the change only if the import succeed. Sometimes it is necessary to use autocommit=true, since some content can not
be changed within a transaction.
type: bool
default: false
notes:
- Requires the pymssql Python package on the remote host. For Ubuntu, this
is as easy as pip install pymssql (See M(ansible.builtin.pip).)
- Requires the pymssql Python package on the remote host. For Ubuntu, this is as easy as pip install pymssql (See M(ansible.builtin.pip)).
requirements:
- pymssql
author: Vedit Firat Arig (@vedit)
'''
"""
EXAMPLES = '''
EXAMPLES = r"""
- name: Create a new database with name 'jackdata'
community.general.mssql_db:
name: jackdata
@ -92,11 +89,11 @@ EXAMPLES = '''
name: my_db
state: import
target: /tmp/dump.sql
'''
"""
RETURN = '''
RETURN = r"""
#
'''
"""
import os
import traceback

View File

@ -7,8 +7,7 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = r'''
---
DOCUMENTATION = r"""
module: mssql_script
short_description: Execute SQL scripts on a MSSQL database
@ -17,7 +16,6 @@ version_added: "4.0.0"
description:
- Execute SQL scripts on a MSSQL database.
extends_documentation_fragment:
- community.general.attributes
@ -32,7 +30,7 @@ attributes:
options:
name:
description: Database to run script against.
aliases: [ db ]
aliases: [db]
default: ''
type: str
login_user:
@ -58,8 +56,7 @@ options:
type: str
transaction:
description:
- If transactional mode is requested, start a transaction and commit the change only if the script succeed.
Otherwise, rollback the transaction.
- If transactional mode is requested, start a transaction and commit the change only if the script succeed. Otherwise, rollback the transaction.
- If transactional mode is not requested (default), automatically commit the change.
type: bool
default: false
@ -69,25 +66,24 @@ options:
- With V(default) each row will be returned as a list of values. See RV(query_results).
- Output format V(dict) will return dictionary with the column names as keys. See RV(query_results_dict).
- V(dict) requires named columns to be returned by each query otherwise an error is thrown.
choices: [ "dict", "default" ]
choices: ["dict", "default"]
default: 'default'
type: str
params:
description: |
description: |-
Parameters passed to the script as SQL parameters.
(Query V('SELECT %(name\)s"') with V(example: '{"name": "John Doe"}).)'
(Query V('SELECT %(name\)s"') with V(example: '{"name": "John Doe"}).)'.
type: dict
notes:
- Requires the pymssql Python package on the remote host. For Ubuntu, this
is as easy as C(pip install pymssql) (See M(ansible.builtin.pip).)
- Requires the pymssql Python package on the remote host. For Ubuntu, this is as easy as C(pip install pymssql) (See M(ansible.builtin.pip)).
requirements:
- pymssql
author:
- Kris Budde (@kbudde)
'''
"""
EXAMPLES = r'''
EXAMPLES = r"""
- name: Check DB connection
community.general.mssql_script:
login_user: "{{ mssql_login_user }}"
@ -165,9 +161,9 @@ EXAMPLES = r'''
- result_batches_dict.query_results_dict[0] | length == 2 # two selects in first batch
- result_batches_dict.query_results_dict[0][0] | length == 1 # one row in first select
- result_batches_dict.query_results_dict[0][0][0]['b0s0'] == 'Batch 0 - Select 0' # column 'b0s0' of first row
'''
"""
RETURN = r'''
RETURN = r"""
query_results:
description: List of batches (queries separated by V(GO) keyword).
type: list
@ -205,8 +201,8 @@ query_results_dict:
queries:
description:
- List of result sets of each query.
- If a query returns no results, the results of this and all the following queries will not be included in the output.
Use 'GO' keyword to separate queries.
- If a query returns no results, the results of this and all the following queries will not be included in the output. Use 'GO' keyword
to separate queries.
type: list
elements: list
contains:
@ -222,7 +218,7 @@ query_results_dict:
type: dict
example: {"col_name": "Batch 0 - Select 0"}
returned: success, if output is dict
'''
"""
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
import traceback

View File

@ -14,20 +14,19 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: nagios
short_description: Perform common tasks in Nagios related to downtime and notifications
description:
- "The C(nagios) module has two basic functions: scheduling downtime and toggling alerts for services or hosts."
- 'The C(nagios) module has two basic functions: scheduling downtime and toggling alerts for services or hosts.'
- The C(nagios) module is not idempotent.
- All actions require the O(host) parameter to be given explicitly. In playbooks you can use the C({{inventory_hostname}}) variable to refer
to the host the playbook is currently running on.
- You can specify multiple services at once by separating them with commas, .e.g. O(services=httpd,nfs,puppet).
- When specifying what service to handle there is a special service value, O(host), which will handle alerts/downtime/acknowledge for the I(host itself),
for example O(services=host). This keyword may not be given with other services at the same time.
B(Setting alerts/downtime/acknowledge for a host does not affect alerts/downtime/acknowledge for any of the services running on it.)
To schedule downtime for all services on particular host use keyword "all", for example O(services=all).
- You can specify multiple services at once by separating them with commas, for example O(services=httpd,nfs,puppet).
- When specifying what service to handle there is a special service value, O(host), which will handle alerts/downtime/acknowledge for the I(host
itself), for example O(services=host). This keyword may not be given with other services at the same time. B(Setting alerts/downtime/acknowledge
for a host does not affect alerts/downtime/acknowledge for any of the services running on it.) To schedule downtime for all services on particular
host use keyword "all", for example O(services=all).
extends_documentation_fragment:
- community.general.attributes
attributes:
@ -41,9 +40,8 @@ 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:
@ -51,13 +49,11 @@ options:
type: str
cmdfile:
description:
- Path to the nagios I(command file) (FIFO pipe).
Only required if auto-detection fails.
- Path to the nagios I(command file) (FIFO pipe). Only required if auto-detection fails.
type: str
author:
description:
- Author to leave downtime comments as.
Only used when O(action) is V(downtime) or V(acknowledge).
- Author to leave downtime comments as. Only used when O(action) is V(downtime) or V(acknowledge).
type: str
default: Ansible
comment:
@ -79,8 +75,8 @@ options:
services:
description:
- What to manage downtime/alerts for. Separate multiple services with commas.
- "B(Required) option when O(action) is one of: V(downtime), V(acknowledge), V(forced_check), V(enable_alerts), V(disable_alerts)."
aliases: [ "service" ]
- 'B(Required) option when O(action) is one of: V(downtime), V(acknowledge), V(forced_check), V(enable_alerts), V(disable_alerts).'
aliases: ["service"]
type: str
servicegroup:
description:
@ -94,9 +90,9 @@ options:
type: str
author: "Tim Bielawa (@tbielawa)"
'''
"""
EXAMPLES = '''
EXAMPLES = r"""
- name: Set 30 minutes of apache downtime
community.general.nagios:
action: downtime
@ -245,7 +241,7 @@ EXAMPLES = '''
community.general.nagios:
action: command
command: DISABLE_FAILURE_PREDICTION
'''
"""
import time
import os.path

View File

@ -9,13 +9,12 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: netcup_dns
notes: []
short_description: Manage Netcup DNS records
description:
- "Manages DNS records via the Netcup API, see the docs U(https://ccp.netcup.net/run/webservice/servers/endpoint.php)."
- Manages DNS records using the Netcup API, see the docs U(https://ccp.netcup.net/run/webservice/servers/endpoint.php).
extends_documentation_fragment:
- community.general.attributes
attributes:
@ -26,12 +25,12 @@ attributes:
options:
api_key:
description:
- "API key for authentication, must be obtained via the netcup CCP (U(https://ccp.netcup.net))."
- API key for authentication, must be obtained using the netcup CCP (U(https://ccp.netcup.net)).
required: true
type: str
api_password:
description:
- "API password for authentication, must be obtained via the netcup CCP (U(https://ccp.netcup.net))."
- API password for authentication, must be obtained using the netcup CCP (U(https://ccp.netcup.net)).
required: true
type: str
customer_id:
@ -48,7 +47,7 @@ options:
description:
- Record to add or delete, supports wildcard (V(*)). Default is V(@) (that is, the zone name).
default: "@"
aliases: [ name ]
aliases: [name]
type: str
type:
description:
@ -80,7 +79,7 @@ options:
- Whether the record should exist or not.
required: false
default: present
choices: [ 'present', 'absent' ]
choices: ['present', 'absent']
type: str
timeout:
description:
@ -91,10 +90,9 @@ options:
requirements:
- "nc-dnsapi >= 0.1.3"
author: "Nicolai Buchwitz (@nbuchwitz)"
"""
'''
EXAMPLES = '''
EXAMPLES = r"""
- name: Create a record of type A
community.general.netcup_dns:
api_key: "..."
@ -156,41 +154,41 @@ EXAMPLES = '''
type: "A"
value: "127.0.0.1"
timeout: 30
"""
'''
RETURN = '''
RETURN = r"""
records:
description: list containing all records
description: List containing all records.
returned: success
type: complex
type: list
elements: dict
contains:
name:
description: the record name
description: The record name.
returned: success
type: str
sample: fancy-hostname
type:
description: the record type
description: The record type.
returned: success
type: str
sample: A
value:
description: the record destination
description: The record destination.
returned: success
type: str
sample: 127.0.0.1
priority:
description: the record priority (only relevant if type=MX)
description: The record priority (only relevant if RV(records[].type=MX)).
returned: success
type: int
sample: 0
id:
description: internal id of the record
description: Internal id of the record.
returned: success
type: int
sample: 12345
'''
"""
import traceback

View File

@ -9,13 +9,12 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: newrelic_deployment
author: "Matt Coddington (@mcodd)"
short_description: Notify New Relic about app deployments
description:
- Notify New Relic about app deployments (see https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/record-monitor-deployments/)
- Notify New Relic about app deployments (see U(https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/record-monitor-deployments/)).
extends_documentation_fragment:
- community.general.attributes
attributes:
@ -44,49 +43,48 @@ options:
changelog:
type: str
description:
- A list of changes for this deployment
- A list of changes for this deployment.
required: false
description:
type: str
description:
- Text annotation for the deployment - notes for you
- Text annotation for the deployment - notes for you.
required: false
revision:
type: str
description:
- A revision number (e.g., git commit SHA)
- A revision number (for example, git commit SHA).
required: true
user:
type: str
description:
- The name of the user/process that triggered this deployment
- The name of the user/process that triggered this deployment.
required: false
validate_certs:
description:
- If V(false), SSL certificates will not be validated. This should only be used
on personally controlled sites using self-signed certificates.
- If V(false), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates.
required: false
default: true
type: bool
app_name_exact_match:
type: bool
description:
- If this flag is set to V(true) then the application ID lookup by name would only work for an exact match.
If set to V(false) it returns the first result.
- If this flag is set to V(true) then the application ID lookup by name would only work for an exact match. If set to V(false) it returns
the first result.
required: false
default: false
version_added: 7.5.0
requirements: []
'''
"""
EXAMPLES = '''
EXAMPLES = r"""
- name: Notify New Relic about an app deployment
community.general.newrelic_deployment:
token: AAAAAA
app_name: myapp
user: ansible deployment
revision: '1.0'
'''
"""
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.urls import fetch_url

View File

@ -9,11 +9,11 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
DOCUMENTATION = r"""
module: nexmo
short_description: Send a SMS via nexmo
short_description: Send a SMS using nexmo
description:
- Send a SMS message via nexmo
- Send a SMS message using nexmo.
author: "Matt Martz (@sivel)"
attributes:
check_mode:
@ -24,42 +24,40 @@ options:
api_key:
type: str
description:
- Nexmo API Key
- Nexmo API Key.
required: true
api_secret:
type: str
description:
- Nexmo API Secret
- Nexmo API Secret.
required: true
src:
type: int
description:
- Nexmo Number to send from
- Nexmo Number to send from.
required: true
dest:
type: list
elements: int
description:
- Phone number(s) to send SMS message to
- Phone number(s) to send SMS message to.
required: true
msg:
type: str
description:
- Message to text to send. Messages longer than 160 characters will be
split into multiple messages
- Message to text to send. Messages longer than 160 characters will be split into multiple messages.
required: true
validate_certs:
description:
- If V(false), SSL certificates will not be validated. This should only be used
on personally controlled sites using self-signed certificates.
- If V(false), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates.
type: bool
default: true
extends_documentation_fragment:
- ansible.builtin.url
- community.general.attributes
'''
"""
EXAMPLES = """
EXAMPLES = r"""
- name: Send notification message via Nexmo
community.general.nexmo:
api_key: 640c8a53

View File

@ -9,8 +9,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = r'''
---
DOCUMENTATION = r"""
module: nginx_status_info
short_description: Retrieve information on nginx status
description:
@ -34,9 +33,9 @@ options:
notes:
- See U(http://nginx.org/en/docs/http/ngx_http_stub_status_module.html) for more information.
'''
"""
EXAMPLES = r'''
EXAMPLES = r"""
# Gather status info from nginx on localhost
- name: Get current http stats
community.general.nginx_status_info:
@ -49,10 +48,9 @@ EXAMPLES = r'''
url: http://localhost/nginx_status
timeout: 20
register: result
'''
"""
RETURN = r'''
---
RETURN = r"""
active_connections:
description: Active connections.
returned: success
@ -64,7 +62,8 @@ accepts:
type: int
sample: 81769947
handled:
description: The total number of handled connections. Generally, the parameter value is the same as accepts unless some resource limits have been reached.
description: The total number of handled connections. Generally, the parameter value is the same as accepts unless some resource limits have
been reached.
returned: success
type: int
sample: 81769947
@ -93,7 +92,7 @@ data:
returned: success
type: str
sample: "Active connections: 2340 \nserver accepts handled requests\n 81769947 81769947 144332345 \nReading: 0 Writing: 241 Waiting: 2092 \n"
'''
"""
import re
from ansible.module_utils.basic import AnsibleModule

View File

@ -8,8 +8,7 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = r'''
---
DOCUMENTATION = r"""
module: nictagadm
short_description: Manage nic tags on SmartOS systems
description:
@ -54,11 +53,11 @@ options:
description:
- Create or delete a SmartOS nic tag.
type: str
choices: [ absent, present ]
choices: [absent, present]
default: present
'''
"""
EXAMPLES = r'''
EXAMPLES = r"""
- name: Create 'storage0' on '00:1b:21:a3:f5:4d'
community.general.nictagadm:
name: storage0
@ -70,11 +69,11 @@ EXAMPLES = r'''
community.general.nictagadm:
name: storage0
state: absent
'''
"""
RETURN = r'''
RETURN = r"""
name:
description: nic tag name
description: Nic tag name.
returned: always
type: str
sample: storage0
@ -84,26 +83,26 @@ mac:
type: str
sample: 00:1b:21:a3:f5:4d
etherstub:
description: specifies if the nic tag will create and attach to an etherstub.
description: Specifies if the nic tag will create and attach to an etherstub.
returned: always
type: bool
sample: false
mtu:
description: specifies which MTU size was passed during the nictagadm add command. mtu and etherstub are mutually exclusive.
description: Specifies which MTU size was passed during the nictagadm add command. mtu and etherstub are mutually exclusive.
returned: always
type: int
sample: 1500
force:
description: Shows if -f was used during the deletion of a nic tag
description: Shows if -f was used during the deletion of a nic tag.
returned: always
type: bool
sample: false
state:
description: state of the target
description: State of the target.
returned: always
type: str
sample: present
'''
"""
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.common.network import is_mac

View File

@ -9,8 +9,7 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = r'''
---
DOCUMENTATION = r"""
module: nmcli
author:
- Chris Long (@alcamie101)
@ -20,10 +19,10 @@ requirements:
extends_documentation_fragment:
- community.general.attributes
description:
- 'Manage the network devices. Create, modify and manage various connection and device type e.g., ethernet, teams, bonds, vlans etc.'
- Manage the network devices. Create, modify and manage various connection and device type, for example V(ethernet), V(team), V(bond), V(vlan) and so on.
- 'On CentOS 8 and Fedora >=29 like systems, the requirements can be met by installing the following packages: NetworkManager.'
- 'On CentOS 7 and Fedora <=28 like systems, the requirements can be met by installing the following packages: NetworkManager-tui.'
- 'On Ubuntu and Debian like systems, the requirements can be met by installing the following packages: network-manager'
- 'On Ubuntu and Debian like systems, the requirements can be met by installing the following packages: network-manager.'
- 'On openSUSE, the requirements can be met by installing the following packages: NetworkManager.'
attributes:
check_mode:
@ -35,19 +34,20 @@ options:
description:
- Whether the device should exist or not, taking action if the state is different from what is stated.
- Using O(state=present) to create connection will automatically bring connection up.
- Using O(state=up) and O(state=down) will not modify connection with other parameters. These states have been added in community.general 9.5.0.
- Using O(state=up) and O(state=down) will not modify connection with other parameters. These states have been added in community.general
9.5.0.
type: str
required: true
choices: [ absent, present, up, down ]
choices: [absent, present, up, down]
autoconnect:
description:
- Whether the connection should start on boot.
- Whether the connection profile can be automatically activated
- Whether the connection profile can be automatically activated.
type: bool
default: true
conn_name:
description:
- The name used to call the connection. Pattern is <type>[-<ifname>][-<num>].
- The name used to call the connection. Pattern is V(<type>[-<ifname>][-<num>]).
type: str
required: true
conn_reload:
@ -61,7 +61,7 @@ options:
description:
- The interface to bind the connection to.
- The connection will only be applicable to this interface name.
- A special value of V('*') can be used for interface-independent connections.
- A special value of V(*) can be used for interface-independent connections.
- The ifname argument is mandatory for all connection types except bond, team, bridge, vlan and vpn.
- This parameter defaults to O(conn_name) when left unset for all connection types except vpn that removes it.
type: str
@ -81,26 +81,26 @@ options:
- Using V(bond-slave), V(bridge-slave), or V(team-slave) implies V(ethernet) connection type with corresponding O(slave_type) option.
- 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, 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, loopback]
mode:
description:
- This is the type of device or network connection that you wish to create for a bond or bridge.
type: str
choices: [ 802.3ad, active-backup, balance-alb, balance-rr, balance-tlb, balance-xor, broadcast ]
choices: [802.3ad, active-backup, balance-alb, balance-rr, balance-tlb, balance-xor, broadcast]
default: balance-rr
transport_mode:
description:
- This option sets the connection type of Infiniband IPoIB devices.
type: str
choices: [ datagram, connected ]
choices: [datagram, connected]
version_added: 5.8.0
slave_type:
description:
- Type of the device of this slave's master connection (for example V(bond)).
- Type V(ovs-port) is added in community.general 8.6.0.
type: str
choices: [ 'bond', 'bridge', 'team', 'ovs-port' ]
choices: ['bond', 'bridge', 'team', 'ovs-port']
version_added: 7.0.0
master:
description:
@ -323,7 +323,7 @@ options:
version_added: 3.2.0
method6:
description:
- Configuration method to be used for IPv6
- Configuration method to be used for IPv6.
- If O(ip6) is set, C(ipv6.method) is automatically set to V(manual) and this parameter is not needed.
- V(disabled) was added in community.general 3.3.0.
type: str
@ -344,8 +344,8 @@ options:
version_added: 4.2.0
mtu:
description:
- The connection MTU, e.g. 9000. This can't be applied when creating the interface and is done once the interface has been created.
- Can be used when modifying Team, VLAN, Ethernet (Future plans to implement wifi, gsm, pppoe, infiniband)
- The connection MTU, for example V(9000). This can not be applied when creating the interface and is done once the interface has been created.
- Can be used when modifying Team, VLAN, Ethernet (Future plans to implement wifi, gsm, pppoe, infiniband).
- This parameter defaults to V(1500) when unset.
type: int
dhcp_client_id:
@ -424,13 +424,13 @@ options:
default: 32
path_cost:
description:
- This is only used with 'bridge-slave' - [<1-65535>] - STP port cost for destinations via this slave.
- This is only used with 'bridge-slave' - [<1-65535>] - STP port cost for destinations using this slave.
type: int
default: 100
hairpin:
description:
- This is only used with 'bridge-slave' - 'hairpin mode' for the slave, which allows frames to be sent back out through the slave the
frame was received on.
- This is only used with 'bridge-slave' - 'hairpin mode' for the slave, which allows frames to be sent back out through the slave the frame
was received on.
- The default change to V(false) in community.general 7.0.0. It used to be V(true) before.
type: bool
default: false
@ -438,21 +438,19 @@ options:
description:
- This is the type of device or network connection that you wish to create for a team.
type: str
choices: [ broadcast, roundrobin, activebackup, loadbalance, lacp ]
choices: [broadcast, roundrobin, activebackup, loadbalance, lacp]
default: roundrobin
version_added: 3.4.0
runner_hwaddr_policy:
description:
- This defines the policy of how hardware addresses of team device and port devices
should be set during the team lifetime.
- This defines the policy of how hardware addresses of team device and port devices should be set during the team lifetime.
type: str
choices: [ same_all, by_active, only_active ]
choices: [same_all, by_active, only_active]
version_added: 3.4.0
runner_fast_rate:
description:
- Option specifies the rate at which our link partner is asked to transmit LACPDU
packets. If this is V(true) then packets will be sent once per second. Otherwise they
will be sent every 30 seconds.
- Option specifies the rate at which our link partner is asked to transmit LACPDU packets. If this is V(true) then packets will be sent
once per second. Otherwise they will be sent every 30 seconds.
- Only allowed for O(runner=lacp).
type: bool
version_added: 6.5.0
@ -522,47 +520,45 @@ options:
description:
- The security configuration of the WiFi connection.
- Note the list of suboption attributes may vary depending on which version of NetworkManager/nmcli is installed on the host.
- 'An up-to-date list of supported attributes can be found here:
U(https://networkmanager.dev/docs/api/latest/settings-802-11-wireless-security.html).'
- 'For instance to use common WPA-PSK auth with a password:
V({key-mgmt: wpa-psk, psk: my_password}).'
- 'An up-to-date list of supported attributes can be found here: U(https://networkmanager.dev/docs/api/latest/settings-802-11-wireless-security.html).'
- 'For instance to use common WPA-PSK auth with a password: V({key-mgmt: wpa-psk, psk: my_password}).'
type: dict
suboptions:
auth-alg:
description:
- When WEP is used (that is, if O(wifi_sec.key-mgmt) is V(none) or V(ieee8021x)) indicate the 802.11
authentication algorithm required by the AP here.
- When WEP is used (that is, if O(wifi_sec.key-mgmt) is V(none) or V(ieee8021x)) indicate the 802.11 authentication algorithm required
by the AP here.
- One of V(open) for Open System, V(shared) for Shared Key, or V(leap) for Cisco LEAP.
- When using Cisco LEAP (that is, if O(wifi_sec.key-mgmt=ieee8021x) and O(wifi_sec.auth-alg=leap))
the O(wifi_sec.leap-username) and O(wifi_sec.leap-password) properties
must be specified.
- When using Cisco LEAP (that is, if O(wifi_sec.key-mgmt=ieee8021x) and O(wifi_sec.auth-alg=leap)) the O(wifi_sec.leap-username) and
O(wifi_sec.leap-password) properties must be specified.
type: str
choices: [ open, shared, leap ]
choices: [open, shared, leap]
fils:
description:
- Indicates whether Fast Initial Link Setup (802.11ai) must be enabled for the connection.
- One of V(0) (use global default value), V(1) (disable FILS), V(2) (enable FILS if the supplicant and the access point support it) or V(3)
(enable FILS and fail if not supported).
- One of V(0) (use global default value), V(1) (disable FILS), V(2) (enable FILS if the supplicant and the access point support it)
or V(3) (enable FILS and fail if not supported).
- When set to V(0) and no global default is set, FILS will be optionally enabled.
type: int
choices: [ 0, 1, 2, 3 ]
choices: [0, 1, 2, 3]
default: 0
group:
description:
- A list of group/broadcast encryption algorithms which prevents connections to Wi-Fi networks that do not utilize one of the algorithms in
the list.
- A list of group/broadcast encryption algorithms which prevents connections to Wi-Fi networks that do not utilize one of the algorithms
in the list.
- For maximum compatibility leave this property empty.
type: list
elements: str
choices: [ wep40, wep104, tkip, ccmp ]
choices: [wep40, wep104, tkip, ccmp]
key-mgmt:
description:
- Key management used for the connection.
- One of V(none) (WEP or no password protection), V(ieee8021x) (Dynamic WEP), V(owe) (Opportunistic Wireless Encryption), V(wpa-psk) (WPA2
+ WPA3 personal), V(sae) (WPA3 personal only), V(wpa-eap) (WPA2 + WPA3 enterprise) or V(wpa-eap-suite-b-192) (WPA3 enterprise only).
- One of V(none) (WEP or no password protection), V(ieee8021x) (Dynamic WEP), V(owe) (Opportunistic Wireless Encryption), V(wpa-psk)
(WPA2 + WPA3 personal), V(sae) (WPA3 personal only), V(wpa-eap) (WPA2 + WPA3 enterprise) or V(wpa-eap-suite-b-192) (WPA3 enterprise
only).
- This property must be set for any Wi-Fi connection that uses security.
type: str
choices: [ none, ieee8021x, owe, wpa-psk, sae, wpa-eap, wpa-eap-suite-b-192 ]
choices: [none, ieee8021x, owe, wpa-psk, sae, wpa-eap, wpa-eap-suite-b-192]
leap-password-flags:
description: Flags indicating how to handle the O(wifi_sec.leap-password) property.
type: list
@ -575,20 +571,20 @@ options:
type: str
pairwise:
description:
- A list of pairwise encryption algorithms which prevents connections to Wi-Fi networks that do not utilize one of the algorithms in the
list.
- A list of pairwise encryption algorithms which prevents connections to Wi-Fi networks that do not utilize one of the algorithms in
the list.
- For maximum compatibility leave this property empty.
type: list
elements: str
choices: [ tkip, ccmp ]
choices: [tkip, ccmp]
pmf:
description:
- Indicates whether Protected Management Frames (802.11w) must be enabled for the connection.
- One of V(0) (use global default value), V(1) (disable PMF), V(2) (enable PMF if the
supplicant and the access point support it) or V(3) (enable PMF and fail if not supported).
- One of V(0) (use global default value), V(1) (disable PMF), V(2) (enable PMF if the supplicant and the access point support it) or
V(3) (enable PMF and fail if not supported).
- When set to V(0) and no global default is set, PMF will be optionally enabled.
type: int
choices: [ 0, 1, 2, 3 ]
choices: [0, 1, 2, 3]
default: 0
proto:
description:
@ -597,7 +593,7 @@ options:
- If not specified, both WPA and RSN connections are allowed.
type: list
elements: str
choices: [ wpa, rsn ]
choices: [wpa, rsn]
psk-flags:
description: Flags indicating how to handle the O(wifi_sec.psk) property.
type: list
@ -605,25 +601,23 @@ options:
psk:
description:
- Pre-Shared-Key for WPA networks.
- For WPA-PSK, it is either an ASCII passphrase of 8 to 63 characters that is
(as specified in the 802.11i standard) hashed to derive the
actual key, or the key in form of 64 hexadecimal character.
- For WPA-PSK, it is either an ASCII passphrase of 8 to 63 characters that is (as specified in the 802.11i standard) hashed to derive
the actual key, or the key in form of 64 hexadecimal character.
- The WPA3-Personal networks use a passphrase of any length for SAE authentication.
type: str
wep-key-flags:
description:
- Flags indicating how to handle the O(wifi_sec.wep-key0), O(wifi_sec.wep-key1),
O(wifi_sec.wep-key2), and O(wifi_sec.wep-key3) properties.
- Flags indicating how to handle the O(wifi_sec.wep-key0), O(wifi_sec.wep-key1), O(wifi_sec.wep-key2), and O(wifi_sec.wep-key3) properties.
type: list
elements: int
wep-key-type:
description:
- Controls the interpretation of WEP keys.
- Allowed values are V(1), in which case the key is either a 10- or 26-character hexadecimal string, or a 5- or 13-character ASCII
password; or V(2), in which case the passphrase is provided as a string and will be hashed using the de-facto MD5 method to derive the
actual WEP key.
- Allowed values are V(1), in which case the key is either a 10- or 26-character hexadecimal string, or a 5- or 13-character ASCII password;
or V(2), in which case the passphrase is provided as a string and will be hashed using the de-facto MD5 method to derive the actual
WEP key.
type: int
choices: [ 1, 2 ]
choices: [1, 2]
wep-key0:
description:
- Index 0 WEP key. This is the WEP key used in most networks.
@ -646,18 +640,18 @@ options:
type: str
wep-tx-keyidx:
description:
- When static WEP is used (that is, if O(wifi_sec.key-mgmt=none)) and a non-default WEP key index
is used by the AP, put that WEP key index here.
- When static WEP is used (that is, if O(wifi_sec.key-mgmt=none)) and a non-default WEP key index is used by the AP, put that WEP key
index here.
- Valid values are V(0) (default key) through V(3).
- Note that some consumer access points (like the Linksys WRT54G) number the keys V(1) to V(4).
type: int
choices: [ 0, 1, 2, 3 ]
choices: [0, 1, 2, 3]
default: 0
wps-method:
description:
- Flags indicating which mode of WPS is to be used if any.
- There is little point in changing the default setting as NetworkManager will automatically determine whether it is feasible to start WPS
enrollment from the Access Point capabilities.
- There is little point in changing the default setting as NetworkManager will automatically determine whether it is feasible to start
WPS enrollment from the Access Point capabilities.
- WPS can be disabled by setting this property to a value of V(1).
type: int
default: 0
@ -671,10 +665,8 @@ options:
description:
- The configuration of the WiFi connection.
- Note the list of suboption attributes may vary depending on which version of NetworkManager/nmcli is installed on the host.
- 'An up-to-date list of supported attributes can be found here:
U(https://networkmanager.dev/docs/api/latest/settings-802-11-wireless.html).'
- 'For instance to create a hidden AP mode WiFi connection:
V({hidden: true, mode: ap}).'
- 'An up-to-date list of supported attributes can be found here: U(https://networkmanager.dev/docs/api/latest/settings-802-11-wireless.html).'
- 'For instance to create a hidden AP mode WiFi connection: V({hidden: true, mode: ap}).'
type: dict
suboptions:
ap-isolation:
@ -683,11 +675,11 @@ options:
- This property can be set to a value different from V(-1) only when the interface is configured in AP mode.
- If set to V(1), devices are not able to communicate with each other. This increases security because it protects devices against attacks
from other clients in the network. At the same time, it prevents devices to access resources on the same wireless networks as file
shares, printers, etc.
shares, printers, and so on.
- If set to V(0), devices can talk to each other.
- When set to V(-1), the global default is used; in case the global default is unspecified it is assumed to be V(0).
type: int
choices: [ -1, 0, 1 ]
choices: [-1, 0, 1]
default: -1
assigned-mac-address:
description:
@ -701,11 +693,11 @@ options:
description:
- 802.11 frequency band of the network.
- One of V(a) for 5GHz 802.11a or V(bg) for 2.4GHz 802.11.
- This will lock associations to the Wi-Fi network to the specific band, so for example, if V(a) is specified, the device will not
associate with the same network in the 2.4GHz band even if the network's settings are compatible.
- This will lock associations to the Wi-Fi network to the specific band, so for example, if V(a) is specified, the device will not associate
with the same network in the 2.4GHz band even if the network's settings are compatible.
- This setting depends on specific driver capability and may not work with all drivers.
type: str
choices: [ a, bg ]
choices: [a, bg]
bssid:
description:
- If specified, directs the device to only associate with the given access point.
@ -721,39 +713,39 @@ options:
default: 0
cloned-mac-address:
description:
- This D-Bus field is deprecated in favor of O(wifi.assigned-mac-address) which is more flexible and allows specifying special variants like
V(random).
- This D-Bus field is deprecated in favor of O(wifi.assigned-mac-address) which is more flexible and allows specifying special variants
like V(random).
- For libnm and nmcli, this field is called C(cloned-mac-address).
type: str
generate-mac-address-mask:
description:
- With O(wifi.cloned-mac-address) setting V(random) or V(stable), by default all bits of the MAC address are scrambled and a
locally-administered, unicast MAC address is created. This property allows to specify that certain bits are fixed.
- With O(wifi.cloned-mac-address) setting V(random) or V(stable), by default all bits of the MAC address are scrambled and a locally-administered,
unicast MAC address is created. This property allows to specify that certain bits are fixed.
- Note that the least significant bit of the first MAC address will always be unset to create a unicast MAC address.
- If the property is V(null), it is eligible to be overwritten by a default connection setting.
- If the value is still V(null) or an empty string, the default is to create a locally-administered, unicast MAC address.
- If the value contains one MAC address, this address is used as mask. The set bits of the mask are to be filled with the current MAC
address of the device, while the unset bits are subject to randomization.
- Setting V(FE:FF:FF:00:00:00) means to preserve the OUI of the current MAC address and only randomize the lower 3 bytes using the
V(random) or V(stable) algorithm.
- If the value contains one additional MAC address after the mask, this address is used instead of the current MAC address to fill the bits
that shall not be randomized.
- For example, a value of V(FE:FF:FF:00:00:00 68:F7:28:00:00:00) will set the OUI of the MAC address to 68:F7:28, while the lower bits are
randomized.
- Setting V(FE:FF:FF:00:00:00) means to preserve the OUI of the current MAC address and only randomize the lower 3 bytes using the V(random)
or V(stable) algorithm.
- If the value contains one additional MAC address after the mask, this address is used instead of the current MAC address to fill the
bits that shall not be randomized.
- For example, a value of V(FE:FF:FF:00:00:00 68:F7:28:00:00:00) will set the OUI of the MAC address to 68:F7:28, while the lower bits
are randomized.
- A value of V(02:00:00:00:00:00 00:00:00:00:00:00) will create a fully scrambled globally-administered, burned-in MAC address.
- If the value contains more than one additional MAC addresses, one of them is chosen randomly. For example,
V(02:00:00:00:00:00 00:00:00:00:00:00 02:00:00:00:00:00) will create a fully scrambled MAC address, randomly locally or globally
administered.
- If the value contains more than one additional MAC addresses, one of them is chosen randomly. For example, V(02:00:00:00:00:00 00:00:00:00:00:00
02:00:00:00:00:00) will create a fully scrambled MAC address, randomly locally or globally administered.
type: str
hidden:
description:
- If V(true), indicates that the network is a non-broadcasting network that hides its SSID. This works both in infrastructure and AP mode.
- In infrastructure mode, various workarounds are used for a more reliable discovery of hidden networks, such as probe-scanning the SSID.
However, these workarounds expose inherent insecurities with hidden SSID networks, and thus hidden SSID networks should be used with
caution.
- If V(true), indicates that the network is a non-broadcasting network that hides its SSID. This works both in infrastructure and AP
mode.
- In infrastructure mode, various workarounds are used for a more reliable discovery of hidden networks, such as probe-scanning the
SSID. However, these workarounds expose inherent insecurities with hidden SSID networks, and thus hidden SSID networks should be used
with caution.
- In AP mode, the created network does not broadcast its SSID.
- Note that marking the network as hidden may be a privacy issue for you (in infrastructure mode) or client stations (in AP mode), as the
explicit probe-scans are distinctly recognizable on the air.
- Note that marking the network as hidden may be a privacy issue for you (in infrastructure mode) or client stations (in AP mode), as
the explicit probe-scans are distinctly recognizable on the air.
type: bool
default: false
mac-address-blacklist:
@ -769,7 +761,7 @@ options:
- This property is deprecated for O(wifi.cloned-mac-address).
type: int
default: 0
choices: [ 0, 1, 2 ]
choices: [0, 1, 2]
mac-address:
description:
- If specified, this connection will only apply to the Wi-Fi device whose permanent MAC address matches.
@ -778,7 +770,7 @@ options:
mode:
description: Wi-Fi network mode. If blank, V(infrastructure) is assumed.
type: str
choices: [ infrastructure, mesh, adhoc, ap ]
choices: [infrastructure, mesh, adhoc, ap]
default: infrastructure
mtu:
description: If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple Ethernet frames.
@ -786,12 +778,12 @@ options:
default: 0
powersave:
description:
- One of V(2) (disable Wi-Fi power saving), V(3) (enable Wi-Fi power saving), V(1) (don't touch currently configure setting) or V(0) (use
the globally configured value).
- One of V(2) (disable Wi-Fi power saving), V(3) (enable Wi-Fi power saving), V(1) (do not touch currently configure setting) or V(0)
(use the globally configured value).
- All other values are reserved.
type: int
default: 0
choices: [ 0, 1, 2, 3 ]
choices: [0, 1, 2, 3]
rate:
description:
- If non-zero, directs the device to only use the specified bitrate for communication with the access point.
@ -812,8 +804,8 @@ options:
- May be any combination of C(NM_SETTING_WIRELESS_WAKE_ON_WLAN_ANY) (V(0x2)), C(NM_SETTING_WIRELESS_WAKE_ON_WLAN_DISCONNECT) (V(0x4)),
C(NM_SETTING_WIRELESS_WAKE_ON_WLAN_MAGIC) (V(0x8)), C(NM_SETTING_WIRELESS_WAKE_ON_WLAN_GTK_REKEY_FAILURE) (V(0x10)),
C(NM_SETTING_WIRELESS_WAKE_ON_WLAN_EAP_IDENTITY_REQUEST) (V(0x20)), C(NM_SETTING_WIRELESS_WAKE_ON_WLAN_4WAY_HANDSHAKE) (V(0x40)),
C(NM_SETTING_WIRELESS_WAKE_ON_WLAN_RFKILL_RELEASE) (V(0x80)), C(NM_SETTING_WIRELESS_WAKE_ON_WLAN_TCP) (V(0x100)) or the special values
V(0x1) (to use global settings) and V(0x8000) (to disable management of Wake-on-LAN in NetworkManager).
C(NM_SETTING_WIRELESS_WAKE_ON_WLAN_RFKILL_RELEASE) (V(0x80)), C(NM_SETTING_WIRELESS_WAKE_ON_WLAN_TCP) (V(0x100)) or the special values V(0x1)
(to use global settings) and V(0x8000) (to disable management of Wake-on-LAN in NetworkManager).
- Note the option values' sum must be specified in order to combine multiple options.
type: int
default: 1
@ -829,23 +821,21 @@ options:
description:
- The configuration of the GSM connection.
- Note the list of suboption attributes may vary depending on which version of NetworkManager/nmcli is installed on the host.
- 'An up-to-date list of supported attributes can be found here:
U(https://networkmanager.dev/docs/api/latest/settings-gsm.html).'
- 'For instance to use apn, pin, username and password:
V({apn: provider.apn, pin: 1234, username: apn.username, password: apn.password}).'
- 'An up-to-date list of supported attributes can be found here: U(https://networkmanager.dev/docs/api/latest/settings-gsm.html).'
- 'For instance to use apn, pin, username and password: V({apn: provider.apn, pin: 1234, username: apn.username, password: apn.password}).'
type: dict
version_added: 3.7.0
suboptions:
apn:
description:
- The GPRS Access Point Name specifying the APN used when establishing a data session with the GSM-based network.
- The APN often determines how the user will be billed for their network usage and whether the user has access to the Internet or
just a provider-specific walled-garden, so it is important to use the correct APN for the user's mobile broadband plan.
- The APN often determines how the user will be billed for their network usage and whether the user has access to the Internet or just
a provider-specific walled-garden, so it is important to use the correct APN for the user's mobile broadband plan.
- The APN may only be composed of the characters a-z, 0-9, ., and - per GSM 03.60 Section 14.9.
type: str
auto-config:
description: When V(true), the settings such as O(gsm.apn), O(gsm.username), or O(gsm.password) will default to values that match the network
the modem will register to in the Mobile Broadband Provider database.
description: When V(true), the settings such as O(gsm.apn), O(gsm.username), or O(gsm.password) will default to values that match the
network the modem will register to in the Mobile Broadband Provider database.
type: bool
default: false
device-id:
@ -881,15 +871,13 @@ options:
password-flags:
description:
- NMSettingSecretFlags indicating how to handle the O(gsm.password) property.
- 'Following choices are allowed:
V(0) B(NONE): The system is responsible for providing and storing this secret (default),
V(1) B(AGENT_OWNED): A user secret agent is responsible for providing and storing this secret; when it is required agents will be
asked to retrieve it
V(2) B(NOT_SAVED): This secret should not be saved, but should be requested from the user each time it is needed
V(4) B(NOT_REQUIRED): In situations where it cannot be automatically determined that the secret is required
(some VPNs and PPP providers do not require all secrets) this flag indicates that the specific secret is not required.'
- 'Following choices are allowed: V(0) B(NONE): The system is responsible for providing and storing this secret (default), V(1) B(AGENT_OWNED):
A user secret agent is responsible for providing and storing this secret; when it is required agents will be asked to retrieve it
V(2) B(NOT_SAVED): This secret should not be saved, but should be requested from the user each time it is needed V(4) B(NOT_REQUIRED):
In situations where it cannot be automatically determined that the secret is required (some VPNs and PPP providers do not require
all secrets) this flag indicates that the specific secret is not required.'
type: int
choices: [ 0, 1, 2 , 4 ]
choices: [0, 1, 2, 4]
default: 0
pin:
description:
@ -901,19 +889,18 @@ options:
- NMSettingSecretFlags indicating how to handle the O(gsm.pin) property.
- See O(gsm.password-flags) for NMSettingSecretFlags choices.
type: int
choices: [ 0, 1, 2 , 4 ]
choices: [0, 1, 2, 4]
default: 0
sim-id:
description:
- The SIM card unique identifier (as given by the C(WWAN) management service) which this connection applies to.
- 'If given, the connection will apply to any device also allowed by O(gsm.device-id) which contains a SIM card matching
the given identifier.'
- If given, the connection will apply to any device also allowed by O(gsm.device-id) which contains a SIM card matching the given identifier.
type: str
sim-operator-id:
description:
- A MCC/MNC string like V(310260) or V(21601I) identifying the specific mobile network operator which this connection applies to.
- 'If given, the connection will apply to any device also allowed by O(gsm.device-id) and O(gsm.sim-id) which contains a SIM card
provisioned by the given operator.'
- If given, the connection will apply to any device also allowed by O(gsm.device-id) and O(gsm.sim-id) which contains a SIM card provisioned
by the given operator.
type: str
username:
description:
@ -924,24 +911,21 @@ options:
description:
- The configuration of the MAC VLAN connection.
- Note the list of suboption attributes may vary depending on which version of NetworkManager/nmcli is installed on the host.
- 'An up-to-date list of supported attributes can be found here:
U(https://networkmanager.dev/docs/api/latest/settings-macvlan.html).'
- 'An up-to-date list of supported attributes can be found here: U(https://networkmanager.dev/docs/api/latest/settings-macvlan.html).'
type: dict
version_added: 6.6.0
suboptions:
mode:
description:
- The macvlan mode, which specifies the communication mechanism between multiple macvlans on the same lower device.
- 'Following choices are allowed: V(1) B(vepa), V(2) B(bridge), V(3) B(private), V(4) B(passthru)
and V(5) B(source)'
- 'Following choices are allowed: V(1) B(vepa), V(2) B(bridge), V(3) B(private), V(4) B(passthru) and V(5) B(source).'
type: int
choices: [ 1, 2, 3, 4, 5 ]
choices: [1, 2, 3, 4, 5]
required: true
parent:
description:
- If given, specifies the parent interface name or parent connection UUID from which this MAC-VLAN interface should
be created. If this property is not specified, the connection must contain an "802-3-ethernet" setting with a
"mac-address" property.
- If given, specifies the parent interface name or parent connection UUID from which this MAC-VLAN interface should be created. If this
property is not specified, the connection must contain an "802-3-ethernet" setting with a "mac-address" property.
type: str
required: true
promiscuous:
@ -956,10 +940,8 @@ options:
description:
- The configuration of the Wireguard connection.
- Note the list of suboption attributes may vary depending on which version of NetworkManager/nmcli is installed on the host.
- 'An up-to-date list of supported attributes can be found here:
U(https://networkmanager.dev/docs/api/latest/settings-wireguard.html).'
- 'For instance to configure a listen port:
V({listen-port: 12345}).'
- 'An up-to-date list of supported attributes can be found here: U(https://networkmanager.dev/docs/api/latest/settings-wireguard.html).'
- 'For instance to configure a listen port: V({listen-port: 12345}).'
type: dict
version_added: 4.3.0
suboptions:
@ -972,24 +954,23 @@ options:
ip4-auto-default-route:
description:
- Whether to enable special handling of the IPv4 default route.
- If enabled, the IPv4 default route from O(wireguard.peer-routes) will be placed to a dedicated routing-table and two policy
routing rules will be added.
- The fwmark number is also used as routing-table for the default-route, and if fwmark is zero, an unused fwmark/table is chosen
automatically. This corresponds to what wg-quick does with Table=auto and what WireGuard calls "Improved Rule-based Routing"
- If enabled, the IPv4 default route from O(wireguard.peer-routes) will be placed to a dedicated routing-table and two policy routing
rules will be added.
- The fwmark number is also used as routing-table for the default-route, and if fwmark is zero, an unused fwmark/table is chosen automatically.
This corresponds to what wg-quick does with Table=auto and what WireGuard calls "Improved Rule-based Routing".
type: bool
ip6-auto-default-route:
description:
- Like O(wireguard.ip4-auto-default-route), but for the IPv6 default route.
type: bool
listen-port:
description: The WireGuard connection listen-port. If not specified, the port will be chosen randomly when the
interface comes up.
description: The WireGuard connection listen-port. If not specified, the port will be chosen randomly when the interface comes up.
type: int
mtu:
description:
- If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple fragments.
- If zero a default MTU is used. Note that contrary to wg-quick's MTU setting, this does not take into account the current routes
at the time of activation.
- If zero a default MTU is used. Note that contrary to wg-quick's MTU setting, this does not take into account the current routes at
the time of activation.
type: int
peer-routes:
description:
@ -998,8 +979,8 @@ options:
C(ipv6.route-table). Usually you want this automatism enabled.
- If V(false), no such routes are added automatically. In this case, the user may want to configure static routes in C(ipv4.routes)
and C(ipv6.routes), respectively.
- Note that if the peer's AllowedIPs is V(0.0.0.0/0) or V(::/0) and the profile's C(ipv4.never-default) or C(ipv6.never-default)
setting is enabled, the peer route for this peer won't be added automatically.
- Note that if the peer's AllowedIPs is V(0.0.0.0/0) or V(::/0) and the profile's C(ipv4.never-default) or C(ipv6.never-default) setting
is enabled, the peer route for this peer will not be added automatically.
type: bool
private-key:
description: The 256 bit private-key in base64 encoding.
@ -1007,12 +988,12 @@ options:
private-key-flags:
description: C(NMSettingSecretFlags) indicating how to handle the O(wireguard.private-key) property.
type: int
choices: [ 0, 1, 2 ]
choices: [0, 1, 2]
vpn:
description:
- Configuration of a VPN connection (PPTP and L2TP).
- In order to use L2TP you need to be sure that C(network-manager-l2tp) - and C(network-manager-l2tp-gnome)
if host has UI - are installed on the host.
- In order to use L2TP you need to be sure that C(network-manager-l2tp) - and C(network-manager-l2tp-gnome) if host has UI - are installed
on the host.
type: dict
version_added: 5.1.0
suboptions:
@ -1025,22 +1006,19 @@ options:
type: str
required: true
gateway:
description: The gateway to connection. It can be an IP address (for example V(192.0.2.1))
or a FQDN address (for example V(vpn.example.com)).
description: The gateway to connection. It can be an IP address (for example V(192.0.2.1)) or a FQDN address (for example V(vpn.example.com)).
type: str
required: true
password-flags:
description:
- NMSettingSecretFlags indicating how to handle the C(vpn.password) property.
- 'Following choices are allowed:
V(0) B(NONE): The system is responsible for providing and storing this secret (default);
V(1) B(AGENT_OWNED): A user secret agent is responsible for providing and storing this secret; when it is required agents will be
asked to retrieve it;
V(2) B(NOT_SAVED): This secret should not be saved, but should be requested from the user each time it is needed;
V(4) B(NOT_REQUIRED): In situations where it cannot be automatically determined that the secret is required
(some VPNs and PPP providers do not require all secrets) this flag indicates that the specific secret is not required.'
- 'Following choices are allowed: V(0) B(NONE): The system is responsible for providing and storing this secret (default); V(1) B(AGENT_OWNED):
A user secret agent is responsible for providing and storing this secret; when it is required agents will be asked to retrieve it;
V(2) B(NOT_SAVED): This secret should not be saved, but should be requested from the user each time it is needed; V(4) B(NOT_REQUIRED):
In situations where it cannot be automatically determined that the secret is required (some VPNs and PPP providers do not require
all secrets) this flag indicates that the specific secret is not required.'
type: int
choices: [ 0, 1, 2 , 4 ]
choices: [0, 1, 2, 4]
default: 0
user:
description: Username provided by VPN administrator.
@ -1054,8 +1032,7 @@ options:
ipsec-psk:
description:
- The pre-shared key in base64 encoding.
- >
You can encode using this Ansible jinja2 expression: V("0s{{ '[YOUR PRE-SHARED KEY]' | ansible.builtin.b64encode }}").
- "You can encode using this Ansible jinja2 expression: V(\"0s{{ '[YOUR PRE-SHARED KEY]' | ansible.builtin.b64encode }}\")."
- This is only used when O(vpn.ipsec-enabled=true).
type: str
sriov:
@ -1090,9 +1067,9 @@ options:
- 'Virtual function descriptors in the form: V(INDEX [ATTR=VALUE[ ATTR=VALUE]...]).'
- Multiple VFs can be specified using a comma as separator, for example V(2 mac=00:11:22:33:44:55 spoof-check=true,3 vlans=100).
type: str
'''
"""
EXAMPLES = r'''
EXAMPLES = r"""
# These examples are using the following inventory:
#
# ## Directory layout:
@ -1203,7 +1180,6 @@ EXAMPLES = r'''
## playbook-add.yml example
---
- hosts: openstack-stage
remote_user: root
tasks:
@ -1595,7 +1571,7 @@ EXAMPLES = r'''
slave_type: ovs-port
type: ethernet
state: present
'''
"""
RETURN = r"""#
"""

View File

@ -8,8 +8,7 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: nomad_job
author: FERREIRA Christophe (@chris93111)
version_added: "1.3.0"
@ -17,7 +16,7 @@ short_description: Launch a Nomad Job
description:
- Launch a Nomad job.
- Stop a Nomad job.
- Force start a Nomad job
- Force start a Nomad job.
requirements:
- python-nomad
extends_documentation_fragment:
@ -61,9 +60,9 @@ seealso:
- name: Nomad jobs documentation
description: Complete documentation for Nomad API jobs.
link: https://www.nomadproject.io/api-docs/jobs/
'''
"""
EXAMPLES = '''
EXAMPLES = r"""
- name: Create job
community.general.nomad_job:
host: localhost
@ -92,7 +91,7 @@ EXAMPLES = '''
name: api
timeout: 120
force_start: true
'''
"""
import json

View File

@ -8,8 +8,7 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: nomad_job_info
author: FERREIRA Christophe (@chris93111)
version_added: "1.3.0"
@ -33,9 +32,9 @@ seealso:
- name: Nomad jobs documentation
description: Complete documentation for Nomad API jobs.
link: https://www.nomadproject.io/api-docs/jobs/
'''
"""
EXAMPLES = '''
EXAMPLES = r"""
- name: Get info for job awx
community.general.nomad_job_info:
host: localhost
@ -46,10 +45,9 @@ EXAMPLES = '''
community.general.nomad_job_info:
host: localhost
register: result
"""
'''
RETURN = '''
RETURN = r"""
result:
description: List with dictionary contains jobs info
returned: success
@ -264,7 +262,7 @@ result:
}
]
'''
"""
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
from ansible.module_utils.common.text.converters import to_native

View File

@ -9,8 +9,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: nomad_token
author: Pedro Nascimento (@apecnascimento)
version_added: "8.1.0"
@ -60,9 +59,9 @@ seealso:
- name: Nomad ACL documentation
description: Complete documentation for Nomad API ACL.
link: https://developer.hashicorp.com/nomad/api-docs/acl/tokens
'''
"""
EXAMPLES = '''
EXAMPLES = r"""
- name: Create boostrap token
community.general.nomad_token:
host: localhost
@ -95,9 +94,9 @@ EXAMPLES = '''
host: localhost
name: "Dev token"
state: absent
'''
"""
RETURN = '''
RETURN = r"""
result:
description: Result returned by nomad.
returned: always
@ -119,7 +118,7 @@ result:
"secret_id": "12e878ab-e1f6-e103-b4c4-3b5173bb4cea",
"type": "client"
}
'''
"""
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
from ansible.module_utils.common.text.converters import to_native

View File

@ -9,8 +9,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: nosh
author:
- "Thomas Caravia (@tacatac)"
@ -34,42 +33,37 @@ options:
state:
type: str
required: false
choices: [ started, stopped, reset, restarted, reloaded ]
choices: [started, stopped, reset, restarted, reloaded]
description:
- V(started)/V(stopped) are idempotent actions that will not run
commands unless necessary.
V(restarted) will always bounce the service.
V(reloaded) will send a SIGHUP or start the service.
V(reset) will start or stop the service according to whether it is
enabled or not.
- V(started)/V(stopped) are idempotent actions that will not run commands unless necessary.
- V(restarted) will always bounce the service.
- V(reloaded) will send a SIGHUP or start the service.
- V(reset) will start or stop the service according to whether it is enabled or not.
enabled:
required: false
type: bool
description:
- Enable or disable the service, independently of C(*.preset) file
preference or running state. Mutually exclusive with O(preset). Will take
effect prior to O(state=reset).
- Enable or disable the service, independently of C(*.preset) file preference or running state. Mutually exclusive with O(preset). Will
take effect prior to O(state=reset).
preset:
required: false
type: bool
description:
- Enable or disable the service according to local preferences in C(*.preset) files.
Mutually exclusive with O(enabled). Only has an effect if set to true. Will take
effect prior to O(state=reset).
- Enable or disable the service according to local preferences in C(*.preset) files. Mutually exclusive with O(enabled). Only has an effect
if set to true. Will take effect prior to O(state=reset).
user:
required: false
default: false
type: bool
description:
- Run system-control talking to the calling user's service manager, rather than
the system-wide service manager.
- Run system-control talking to the calling user's service manager, rather than the system-wide service manager.
requirements:
- A system with an active nosh service manager, see Notes for further information.
notes:
- Information on the nosh utilities suite may be found at U(https://jdebp.eu/Softwares/nosh/).
'''
"""
EXAMPLES = '''
EXAMPLES = r"""
- name: Start dnscache if not running
community.general.nosh:
name: dnscache
@ -122,36 +116,36 @@ EXAMPLES = '''
ansible.builtin.fail:
msg: "The {{ result.name }} service is running"
when: result.status and result.status['DaemontoolsEncoreState'] == "running"
'''
"""
RETURN = '''
RETURN = r"""
name:
description: name used to find the service
description: Name used to find the service.
returned: success
type: str
sample: "sshd"
service_path:
description: resolved path for the service
description: Resolved path for the service.
returned: success
type: str
sample: "/var/sv/sshd"
enabled:
description: whether the service is enabled at system bootstrap
description: Whether the service is enabled at system bootstrap.
returned: success
type: bool
sample: true
preset:
description: whether the enabled status reflects the one set in the relevant C(*.preset) file
description: Whether the enabled status reflects the one set in the relevant C(*.preset) file.
returned: success
type: bool
sample: 'False'
state:
description: service process run state, V(none) if the service is not loaded and will not be started
description: Service process run state, V(none) if the service is not loaded and will not be started.
returned: if state option is used
type: str
sample: "reloaded"
status:
description: A dictionary with the key=value pairs returned by C(system-control show-json) or V(none) if the service is not loaded
description: A dictionary with the key=value pairs returned by C(system-control show-json) or V(none) if the service is not loaded.
returned: success
type: complex
contains:
@ -159,7 +153,7 @@ status:
description: [] # FIXME
returned: success
type: list
sample: ["/etc/service-bundles/targets/basic","../sshdgenkeys", "log"]
sample: ["/etc/service-bundles/targets/basic", "../sshdgenkeys", "log"]
Before:
description: [] # FIXME
returned: success
@ -319,18 +313,18 @@ status:
description: [] # FIXME
returned: success
type: list
sample: ["/etc/service-bundles/targets/server","/etc/service-bundles/targets/sockets"]
sample: ["/etc/service-bundles/targets/server", "/etc/service-bundles/targets/sockets"]
Wants:
description: [] # FIXME
returned: success
type: list
sample: ["/etc/service-bundles/targets/basic","../sshdgenkeys"]
sample: ["/etc/service-bundles/targets/basic", "../sshdgenkeys"]
user:
description: whether the user-level service manager is called
description: Whether the user-level service manager is called.
returned: success
type: bool
sample: false
'''
"""
import json

View File

@ -8,8 +8,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = r'''
---
DOCUMENTATION = r"""
module: npm
short_description: Manage node.js packages with npm
description:
@ -83,7 +82,7 @@ options:
required: false
type: str
default: present
choices: [ "present", "absent", "latest" ]
choices: ["present", "absent", "latest"]
no_optional:
description:
- Use the C(--no-optional) flag when installing.
@ -104,9 +103,9 @@ options:
version_added: 9.5.0
requirements:
- npm installed in bin path (recommended /usr/local/bin)
'''
"""
EXAMPLES = r'''
EXAMPLES = r"""
- name: Install "coffee-script" node.js package.
community.general.npm:
name: coffee-script
@ -153,7 +152,7 @@ EXAMPLES = r'''
path: /app/location
executable: /opt/nvm/v0.10.1/bin/npm
state: present
'''
"""
import json
import os

View File

@ -14,13 +14,12 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: nsupdate
short_description: Manage DNS records
description:
- Create, update and remove DNS records using DDNS updates
- Create, update and remove DNS records using DDNS updates.
requirements:
- dnspython
author: "Loic Blot (@nerzhul)"
@ -50,17 +49,16 @@ options:
type: int
key_name:
description:
- Use TSIG key name to authenticate against DNS O(server)
- Use TSIG key name to authenticate against DNS O(server).
type: str
key_secret:
description:
- Use TSIG key secret, associated with O(key_name), to authenticate against O(server)
- Use TSIG key secret, associated with O(key_name), to authenticate against O(server).
type: str
key_algorithm:
description:
- Specify key algorithm used by O(key_secret).
choices: ['HMAC-MD5.SIG-ALG.REG.INT', 'hmac-md5', 'hmac-sha1', 'hmac-sha224', 'hmac-sha256', 'hmac-sha384',
'hmac-sha512']
choices: ['HMAC-MD5.SIG-ALG.REG.INT', 'hmac-md5', 'hmac-sha1', 'hmac-sha224', 'hmac-sha256', 'hmac-sha384', 'hmac-sha512']
default: 'hmac-md5'
type: str
zone:
@ -94,9 +92,9 @@ options:
default: 'tcp'
choices: ['tcp', 'udp']
type: str
'''
"""
EXAMPLES = '''
EXAMPLES = r"""
- name: Add or modify ansible.example.org A to 192.168.1.1"
community.general.nsupdate:
key_name: "nsupdate"
@ -143,49 +141,49 @@ EXAMPLES = '''
record: "1.1.168.192.in-addr.arpa."
type: "PTR"
state: absent
'''
"""
RETURN = '''
RETURN = r"""
changed:
description: If module has modified record
description: If module has modified record.
returned: success
type: str
record:
description: DNS record
description: DNS record.
returned: success
type: str
sample: 'ansible'
ttl:
description: DNS record TTL
description: DNS record TTL.
returned: success
type: int
sample: 86400
type:
description: DNS record type
description: DNS record type.
returned: success
type: str
sample: 'CNAME'
value:
description: DNS record value(s)
description: DNS record value(s).
returned: success
type: list
sample: '192.168.1.1'
zone:
description: DNS record zone
description: DNS record zone.
returned: success
type: str
sample: 'example.org.'
dns_rc:
description: dnspython return code
description: C(dnspython) return code.
returned: always
type: int
sample: 4
dns_rc_str:
description: dnspython return code (string representation)
description: C(dnspython) return code (string representation).
returned: always
type: str
sample: 'REFUSED'
'''
"""
import traceback