s[o-y]*: normalize docs (#9351)

* s[o-y]*: normalize docs

* Apply suggestions from code review

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

* Update plugins/modules/spectrum_model_attrs.py

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
pull/9363/head
Alexei Znamensky 2024-12-25 21:48:22 +13:00 committed by GitHub
parent 6cd3f79e19
commit 4b23e5ecff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
20 changed files with 994 additions and 1174 deletions

View File

@ -8,8 +8,7 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = r''' DOCUMENTATION = r"""
---
module: solaris_zone module: solaris_zone
short_description: Manage Solaris zones short_description: Manage Solaris zones
description: description:
@ -31,14 +30,13 @@ options:
description: description:
- V(present), configure and install the zone. - V(present), configure and install the zone.
- V(installed), synonym for V(present). - V(installed), synonym for V(present).
- V(running), if the zone already exists, boot it, otherwise, configure and install - V(running), if the zone already exists, boot it, otherwise, configure and install the zone first, then boot it.
the zone first, then boot it.
- V(started), synonym for V(running). - V(started), synonym for V(running).
- V(stopped), shutdown a zone. - V(stopped), shutdown a zone.
- V(absent), destroy the zone. - V(absent), destroy the zone.
- V(configured), configure the ready so that it's to be attached. - V(configured), configure the ready so that it's to be attached.
- V(attached), attach a zone, but do not boot it. - V(attached), attach a zone, but do not boot it.
- V(detached), shutdown and detach a zone - V(detached), shutdown and detach a zone.
type: str type: str
choices: [absent, attached, configured, detached, installed, present, running, started, stopped] choices: [absent, attached, configured, detached, installed, present, running, started, stopped]
default: present default: present
@ -53,8 +51,7 @@ options:
required: true required: true
path: path:
description: description:
- The path where the zone will be created. This is required when the zone is created, but not - The path where the zone will be created. This is required when the zone is created, but not used otherwise.
used otherwise.
type: str type: str
sparse: sparse:
description: description:
@ -63,32 +60,29 @@ options:
default: false default: false
root_password: root_password:
description: description:
- The password hash for the root account. If not specified, the zone's root account - The password hash for the root account. If not specified, the zone's root account will not have a password.
will not have a password.
type: str type: str
config: config:
description: description:
- 'The zonecfg configuration commands for this zone. See zonecfg(1M) for the valid options - The C(zonecfg) configuration commands for this zone. See zonecfg(1M) for the valid options and syntax. Typically this is a list of options
and syntax. Typically this is a list of options separated by semi-colons or new lines, e.g. separated by semi-colons or new lines, for example V(set auto-boot=true;add net;set physical=bge0;set address=10.1.1.1;end).
"set auto-boot=true;add net;set physical=bge0;set address=10.1.1.1;end"'
type: str type: str
default: '' default: ''
create_options: create_options:
description: description:
- 'Extra options to the zonecfg(1M) create command.' - Extra options to the zonecfg(1M) create command.
type: str type: str
default: '' default: ''
install_options: install_options:
description: description:
- 'Extra options to the zoneadm(1M) install command. To automate Solaris 11 zone creation, - Extra options to the zoneadm(1M) install command. To automate Solaris 11 zone creation, use this to specify the profile XML file, for example
use this to specify the profile XML file, e.g. install_options="-c sc_profile.xml"' O(install_options=-c sc_profile.xml).
type: str type: str
default: '' default: ''
attach_options: attach_options:
description: description:
- 'Extra options to the zoneadm attach command. For example, this can be used to specify - Extra options to the zoneadm attach command. For example, this can be used to specify whether a minimum or full update of packages is
whether a minimum or full update of packages is required and if any packages need to required and if any packages need to be deleted. For valid values, see zoneadm(1M).
be deleted. For valid values, see zoneadm(1M)'
type: str type: str
default: '' default: ''
timeout: timeout:
@ -96,9 +90,9 @@ options:
- Timeout, in seconds, for zone to boot. - Timeout, in seconds, for zone to boot.
type: int type: int
default: 600 default: 600
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Create and install a zone, but don't boot it - name: Create and install a zone, but don't boot it
community.general.solaris_zone: community.general.solaris_zone:
name: zone1 name: zone1
@ -149,7 +143,7 @@ EXAMPLES = '''
name: zone1 name: zone1
state: attached state: attached
attach_options: -u attach_options: -u
''' """
import os import os
import platform import platform

View File

@ -10,16 +10,14 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = r''' DOCUMENTATION = r"""
---
module: sorcery module: sorcery
short_description: Package manager for Source Mage GNU/Linux short_description: Package manager for Source Mage GNU/Linux
description: description:
- Manages "spells" on Source Mage GNU/Linux using I(sorcery) toolchain - Manages "spells" on Source Mage GNU/Linux using I(sorcery) toolchain.
author: "Vlad Glagolev (@vaygr)" author: "Vlad Glagolev (@vaygr)"
notes: notes:
- When all three components are selected, the update goes by the sequence -- - When all three components are selected, the update goes by the sequence -- Sorcery -> Grimoire(s) -> Spell(s); you cannot override it.
Sorcery -> Grimoire(s) -> Spell(s); you cannot override it.
- Grimoire handling is supported since community.general 7.3.0. - Grimoire handling is supported since community.general 7.3.0.
requirements: requirements:
- bash - bash
@ -35,8 +33,7 @@ options:
description: description:
- Name of the spell or grimoire. - Name of the spell or grimoire.
- Multiple names can be given, separated by commas. - Multiple names can be given, separated by commas.
- Special value V(*) in conjunction with states V(latest) or - Special value V(*) in conjunction with states V(latest) or V(rebuild) will update or rebuild the whole system respectively.
V(rebuild) will update or rebuild the whole system respectively
- The alias O(grimoire) was added in community.general 7.3.0. - The alias O(grimoire) was added in community.general 7.3.0.
aliases: ["spell", "grimoire"] aliases: ["spell", "grimoire"]
type: list type: list
@ -56,21 +53,17 @@ options:
description: description:
- Whether to cast, dispel or rebuild a package. - Whether to cast, dispel or rebuild a package.
- State V(cast) is an equivalent of V(present), not V(latest). - State V(cast) is an equivalent of V(present), not V(latest).
- State V(rebuild) implies cast of all specified spells, not only - State V(rebuild) implies cast of all specified spells, not only those existed before.
those existed before.
choices: ["present", "latest", "absent", "cast", "dispelled", "rebuild"] choices: ["present", "latest", "absent", "cast", "dispelled", "rebuild"]
default: "present" default: "present"
type: str type: str
depends: depends:
description: description:
- Comma-separated list of _optional_ dependencies to build a spell - Comma-separated list of _optional_ dependencies to build a spell (or make sure it is built) with; use V(+)/V(-) in front of dependency
(or make sure it is built) with; use V(+)/V(-) in front of dependency
to turn it on/off (V(+) is optional though). to turn it on/off (V(+) is optional though).
- This option is ignored if O(name) parameter is equal to V(*) or - This option is ignored if O(name) parameter is equal to V(*) or contains more than one spell.
contains more than one spell. - Providers must be supplied in the form recognized by Sorcery, for example 'V(openssl(SSL\))'.
- Providers must be supplied in the form recognized by Sorcery,
for example 'V(openssl(SSL\))'.
type: str type: str
update: update:
@ -93,10 +86,10 @@ options:
- Makes sense only in pair with O(update_cache). - Makes sense only in pair with O(update_cache).
type: int type: int
default: 0 default: 0
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Make sure spell foo is installed - name: Make sure spell foo is installed
community.general.sorcery: community.general.sorcery:
spell: foo spell: foo
@ -184,11 +177,11 @@ EXAMPLES = '''
- name: Update only Sorcery itself - name: Update only Sorcery itself
community.general.sorcery: community.general.sorcery:
update: true update: true
''' """
RETURN = ''' RETURN = r"""
''' """
import datetime import datetime

View File

@ -9,13 +9,12 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = r''' DOCUMENTATION = r"""
---
module: spectrum_device module: spectrum_device
short_description: Creates/deletes devices in CA Spectrum short_description: Creates/deletes devices in CA Spectrum
description: description:
- This module allows you to create and delete devices in CA Spectrum U(https://www.ca.com/us/products/ca-spectrum.html). - This module allows you to create and delete devices in CA Spectrum U(https://www.ca.com/us/products/ca-spectrum.html).
- Tested on CA Spectrum 9.4.2, 10.1.1 and 10.2.1 - Tested on CA Spectrum 9.4.2, 10.1.1 and 10.2.1.
author: "Renato Orgito (@orgito)" author: "Renato Orgito (@orgito)"
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
@ -70,13 +69,12 @@ options:
- Oneclick user password. - Oneclick user password.
use_proxy: use_proxy:
description: description:
- if V(false), it will not use a proxy, even if one is defined in an environment variable on the target hosts. - If V(false), it will not use a proxy, even if one is defined in an environment variable on the target hosts.
default: true default: true
type: bool type: bool
validate_certs: validate_certs:
description: description:
- If V(false), SSL certificates will not be validated. This should only be used - If V(false), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates.
on personally controlled sites using self-signed certificates.
default: true default: true
type: bool type: bool
agentport: agentport:
@ -88,9 +86,9 @@ options:
notes: notes:
- The devices will be created inside the I(Universe) container of the specified landscape. - The devices will be created inside the I(Universe) container of the specified landscape.
- All the operations will be performed only on the specified landscape. - All the operations will be performed only on the specified landscape.
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Add device to CA Spectrum - name: Add device to CA Spectrum
local_action: local_action:
module: spectrum_device module: spectrum_device
@ -113,15 +111,15 @@ EXAMPLES = '''
oneclick_password: password oneclick_password: password
use_proxy: false use_proxy: false
state: absent state: absent
''' """
RETURN = ''' RETURN = r"""
device: device:
description: device data when state = present description: Device data when O(state=present).
returned: success returned: success
type: dict type: dict
sample: {'model_handle': '0x1007ab', 'landscape': '0x100000', 'address': '10.10.5.1'} sample: {'model_handle': '0x1007ab', 'landscape': '0x100000', 'address': '10.10.5.1'}
''' """
from socket import gethostbyname, gaierror from socket import gethostbyname, gaierror
import xml.etree.ElementTree as ET import xml.etree.ElementTree as ET

View File

@ -9,8 +9,7 @@
from __future__ import (absolute_import, division, print_function) from __future__ import (absolute_import, division, print_function)
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = r''' DOCUMENTATION = r"""
---
module: spectrum_model_attrs module: spectrum_model_attrs
short_description: Enforce a model's attributes in CA Spectrum short_description: Enforce a model's attributes in CA Spectrum
description: description:
@ -48,8 +47,7 @@ options:
aliases: [password] aliases: [password]
use_proxy: use_proxy:
description: description:
- if V(false), it will not use a proxy, even if one is defined in - If V(false), it will not use a proxy, even if one is defined in an environment variable on the target hosts.
an environment variable on the target hosts.
default: true default: true
required: false required: false
type: bool type: bool
@ -65,8 +63,8 @@ options:
required: true required: true
validate_certs: validate_certs:
description: description:
- Validate SSL certificates. Only change this to V(false) if you can guarantee that you are talking to the correct endpoint and there is no - Validate SSL certificates. Only change this to V(false) if you can guarantee that you are talking to the correct endpoint and there is
man-in-the-middle attack happening. no man-in-the-middle attack happening.
type: bool type: bool
default: true default: true
required: false required: false
@ -82,25 +80,25 @@ options:
description: description:
- Attribute name OR hex ID. - Attribute name OR hex ID.
- 'Currently defined names are:' - 'Currently defined names are:'
- ' C(App_Manufacturer) (C(0x230683))' - C(App_Manufacturer) (C(0x230683));
- ' C(CollectionsModelNameString) (C(0x12adb))' - C(CollectionsModelNameString) (C(0x12adb));
- ' C(Condition) (C(0x1000a))' - C(Condition) (C(0x1000a));
- ' C(Criticality) (C(0x1290c))' - C(Criticality) (C(0x1290c));
- ' C(DeviceType) (C(0x23000e))' - C(DeviceType) (C(0x23000e));
- ' C(isManaged) (C(0x1295d))' - C(isManaged) (C(0x1295d));
- ' C(Model_Class) (C(0x11ee8))' - C(Model_Class) (C(0x11ee8));
- ' C(Model_Handle) (C(0x129fa))' - C(Model_Handle) (C(0x129fa));
- ' C(Model_Name) (C(0x1006e))' - C(Model_Name) (C(0x1006e));
- ' C(Modeltype_Handle) (C(0x10001))' - C(Modeltype_Handle) (C(0x10001));
- ' C(Modeltype_Name) (C(0x10000))' - C(Modeltype_Name) (C(0x10000));
- ' C(Network_Address) (C(0x12d7f))' - C(Network_Address) (C(0x12d7f));
- ' C(Notes) (C(0x11564))' - C(Notes) (C(0x11564));
- ' C(ServiceDesk_Asset_ID) (C(0x12db9))' - C(ServiceDesk_Asset_ID) (C(0x12db9));
- ' C(TopologyModelNameString) (C(0x129e7))' - C(TopologyModelNameString) (C(0x129e7));
- ' C(sysDescr) (C(0x10052))' - C(sysDescr) (C(0x10052));
- ' C(sysName) (C(0x10b5b))' - C(sysName) (C(0x10b5b));
- ' C(Vendor_Name) (C(0x11570))' - C(Vendor_Name) (C(0x11570));
- ' C(Description) (C(0x230017))' - C(Description) (C(0x230017)).
- Hex IDs are the direct identifiers in Spectrum and will always work. - Hex IDs are the direct identifiers in Spectrum and will always work.
- 'To lookup hex IDs go to the UI: Locator -> Devices -> By Model Name -> <enter any model> -> Attributes tab.' - 'To lookup hex IDs go to the UI: Locator -> Devices -> By Model Name -> <enter any model> -> Attributes tab.'
type: str type: str
@ -110,9 +108,9 @@ options:
- Attribute value. Empty strings should be V("") or V(null). - Attribute value. Empty strings should be V("") or V(null).
type: str type: str
required: true required: true
''' """
EXAMPLES = r''' EXAMPLES = r"""
- name: Enforce maintenance mode for modelxyz01 with a note about why - name: Enforce maintenance mode for modelxyz01 with a note about why
community.general.spectrum_model_attrs: community.general.spectrum_model_attrs:
url: "http://oneclick.url.com" url: "http://oneclick.url.com"
@ -128,9 +126,9 @@ EXAMPLES = r'''
value: "MM set on {{ ansible_date_time.iso8601 }} via CO {{ CO }} by {{ tower_user_name | default(ansible_user_id) }}" value: "MM set on {{ ansible_date_time.iso8601 }} via CO {{ CO }} by {{ tower_user_name | default(ansible_user_id) }}"
delegate_to: localhost delegate_to: localhost
register: spectrum_model_attrs_status register: spectrum_model_attrs_status
''' """
RETURN = r''' RETURN = r"""
msg: msg:
description: Informational message on the job result. description: Informational message on the job result.
type: str type: str
@ -140,11 +138,8 @@ changed_attrs:
description: Dictionary of changed name or hex IDs (whichever was specified) to their new corresponding values. description: Dictionary of changed name or hex IDs (whichever was specified) to their new corresponding values.
type: dict type: dict
returned: always returned: always
sample: { sample: {"Notes": "MM set on 2021-02-03T22:04:02Z via CO CO9999 by tgates", "isManaged": "true"}
"Notes": "MM set on 2021-02-03T22:04:02Z via CO CO9999 by tgates", """
"isManaged": "true"
}
'''
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule

View File

@ -5,19 +5,15 @@
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
from __future__ import (absolute_import, division, print_function) from __future__ import (absolute_import, division, print_function)
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: spotinst_aws_elastigroup module: spotinst_aws_elastigroup
short_description: Create, update or delete Spotinst AWS Elastigroups short_description: Create, update or delete Spotinst AWS Elastigroups
author: Spotinst (@talzur) author: Spotinst (@talzur)
description: description:
- Can create, update, or delete Spotinst AWS Elastigroups - Can create, update, or delete Spotinst AWS Elastigroups Launch configuration is part of the elastigroup configuration, so no additional modules
Launch configuration is part of the elastigroup configuration, are necessary for handling the launch configuration. You will have to have a credentials file in this location - C($HOME/.spotinst/credentials).
so no additional modules are necessary for handling the launch configuration. The credentials file must contain a row that looks like this C(token = <YOUR TOKEN>).
You will have to have a credentials file in this location - <home>/.spotinst/credentials - Full documentation available at U(https://help.spotinst.com/hc/en-us/articles/115003530285-Ansible-).
The credentials file must contain a row that looks like this
token = <YOUR TOKEN>
Full documentation available at https://help.spotinst.com/hc/en-us/articles/115003530285-Ansible-
requirements: requirements:
- spotinst_sdk >= 1.0.38 - spotinst_sdk >= 1.0.38
extends_documentation_fragment: extends_documentation_fragment:
@ -38,62 +34,43 @@ options:
account_id: account_id:
description: description:
- Optional parameter that allows to set an account-id inside the module configuration. - Optional parameter that allows to set an account-id inside the module configuration.
By default this is retrieved from the credentials path. - By default this is retrieved from the credentials path.
type: str type: str
token: token:
description: description:
- A Personal API Access Token issued by Spotinst. - A Personal API Access Token issued by Spotinst.
- >- - 'When not specified, the module will try to obtain it, in that order, from: environment variable E(SPOTINST_TOKEN), or from the credentials
When not specified, the module will try to obtain it, in that order, from: environment variable E(SPOTINST_TOKEN), or from the credentials path. path.'
type: str type: str
availability_vs_cost: availability_vs_cost:
description: description:
- The strategy orientation. - The strategy orientation.
- "The choices available are: V(availabilityOriented), V(costOriented), V(balanced)." - 'The choices available are: V(availabilityOriented), V(costOriented), V(balanced).'
required: true required: true
type: str type: str
availability_zones: availability_zones:
description: description:
- A list of hash/dictionaries of Availability Zones that are configured in the elastigroup; - A list of hash/dictionaries of Availability Zones that are configured in the elastigroup; '[{"key":"value", "key":"value"}]'; keys allowed
'[{"key":"value", "key":"value"}]'; are name (String), subnet_id (String), placement_group_name (String),.
keys allowed are
name (String),
subnet_id (String),
placement_group_name (String),
required: true required: true
type: list type: list
elements: dict elements: dict
block_device_mappings: block_device_mappings:
description: description:
- A list of hash/dictionaries of Block Device Mappings for elastigroup instances; - A list of hash/dictionaries of Block Device Mappings for elastigroup instances; You can specify virtual devices and EBS volumes.; '[{"key":"value",
You can specify virtual devices and EBS volumes.; "key":"value"}]'; keys allowed are device_name (List of Strings), virtual_name (String), no_device (String), ebs (Object, expects the
'[{"key":"value", "key":"value"}]'; following keys- delete_on_termination(Boolean), encrypted(Boolean), iops (Integer), snapshot_id(Integer), volume_type(String), volume_size(Integer)).
keys allowed are
device_name (List of Strings),
virtual_name (String),
no_device (String),
ebs (Object, expects the following keys-
delete_on_termination(Boolean),
encrypted(Boolean),
iops (Integer),
snapshot_id(Integer),
volume_type(String),
volume_size(Integer))
type: list type: list
elements: dict elements: dict
chef: chef:
description: description:
- The Chef integration configuration.; - The Chef integration configuration.; Expects the following keys - chef_server (String), organization (String), user (String), pem_key
Expects the following keys - chef_server (String), (String), chef_version (String).
organization (String),
user (String),
pem_key (String),
chef_version (String)
type: dict type: dict
draining_timeout: draining_timeout:
@ -103,36 +80,30 @@ options:
ebs_optimized: ebs_optimized:
description: description:
- Enable EBS optimization for supported instances which are not enabled by default.; - Enable EBS optimization for supported instances which are not enabled by default.; Note - additional charges will be applied.
Note - additional charges will be applied.
type: bool type: bool
ebs_volume_pool: ebs_volume_pool:
description: description:
- A list of hash/dictionaries of EBS devices to reattach to the elastigroup when available; - A list of hash/dictionaries of EBS devices to reattach to the elastigroup when available; '[{"key":"value", "key":"value"}]'; keys allowed
'[{"key":"value", "key":"value"}]'; are - volume_ids (List of Strings), device_name (String).
keys allowed are -
volume_ids (List of Strings),
device_name (String)
type: list type: list
elements: dict elements: dict
ecs: ecs:
description: description:
- The ECS integration configuration.; - The ECS integration configuration.; Expects the following key - cluster_name (String).
Expects the following key -
cluster_name (String)
type: dict type: dict
elastic_ips: elastic_ips:
description: description:
- List of ElasticIps Allocation Ids (example V(eipalloc-9d4e16f8)) to associate to the group instances - List of ElasticIps Allocation Ids (example V(eipalloc-9d4e16f8)) to associate to the group instances.
type: list type: list
elements: str elements: str
fallback_to_od: fallback_to_od:
description: description:
- In case of no spots available, Elastigroup will launch an On-demand instance instead - In case of no spots available, Elastigroup will launch an On-demand instance instead.
type: bool type: bool
health_check_grace_period: health_check_grace_period:
@ -149,159 +120,129 @@ options:
health_check_type: health_check_type:
description: description:
- The service to use for the health check. - The service to use for the health check.
- "The choices available are: V(ELB), V(HCS), V(TARGET_GROUP), V(MLB), V(EC2)." - 'The choices available are: V(ELB), V(HCS), V(TARGET_GROUP), V(MLB), V(EC2).'
type: str type: str
iam_role_name: iam_role_name:
description: description:
- The instance profile iamRole name - The instance profile iamRole name.
- Only use iam_role_arn, or iam_role_name - Only use O(iam_role_arn) or O(iam_role_name).
type: str type: str
iam_role_arn: iam_role_arn:
description: description:
- The instance profile iamRole arn - The instance profile iamRole arn.
- Only use iam_role_arn, or iam_role_name - Only use O(iam_role_arn) or O(iam_role_name).
type: str type: str
id: id:
description: description:
- The group id if it already exists and you want to update, or delete it. - The group id if it already exists and you want to update, or delete it. This will not work unless the uniqueness_by field is set to id.
This will not work unless the uniqueness_by field is set to id.
When this is set, and the uniqueness_by field is set, the group will either be updated or deleted, but not created. When this is set, and the uniqueness_by field is set, the group will either be updated or deleted, but not created.
type: str type: str
image_id: image_id:
description: description:
- The image Id used to launch the instance.; - The image Id used to launch the instance.; In case of conflict between Instance type and image type, an error will be returned.
In case of conflict between Instance type and image type, an error will be returned
required: true required: true
type: str type: str
key_pair: key_pair:
description: description:
- Specify a Key Pair to attach to the instances - Specify a Key Pair to attach to the instances.
type: str type: str
kubernetes: kubernetes:
description: description:
- The Kubernetes integration configuration. - The Kubernetes integration configuration. Expects the following keys - api_server (String), token (String).
Expects the following keys -
api_server (String),
token (String)
type: dict type: dict
lifetime_period: lifetime_period:
description: description:
- Lifetime period - Lifetime period.
type: int type: int
load_balancers: load_balancers:
description: description:
- List of classic ELB names - List of classic ELB names.
type: list type: list
elements: str elements: str
max_size: max_size:
description: description:
- The upper limit number of instances that you can scale up to - The upper limit number of instances that you can scale up to.
required: true required: true
type: int type: int
mesosphere: mesosphere:
description: description:
- The Mesosphere integration configuration. - The Mesosphere integration configuration. Expects the following key - api_server (String).
Expects the following key -
api_server (String)
type: dict type: dict
min_size: min_size:
description: description:
- The lower limit number of instances that you can scale down to - The lower limit number of instances that you can scale down to.
required: true required: true
type: int type: int
monitoring: monitoring:
description: description:
- Describes whether instance Enhanced Monitoring is enabled - Describes whether instance Enhanced Monitoring is enabled.
type: str type: str
name: name:
description: description:
- Unique name for elastigroup to be created, updated or deleted - Unique name for elastigroup to be created, updated or deleted.
required: true required: true
type: str type: str
network_interfaces: network_interfaces:
description: description:
- A list of hash/dictionaries of network interfaces to add to the elastigroup; - A list of hash/dictionaries of network interfaces to add to the elastigroup; '[{"key":"value", "key":"value"}]'; keys allowed are - description
'[{"key":"value", "key":"value"}]'; (String), device_index (Integer), secondary_private_ip_address_count (Integer), associate_public_ip_address (Boolean), delete_on_termination
keys allowed are - (Boolean), groups (List of Strings), network_interface_id (String), private_ip_address (String), subnet_id (String), associate_ipv6_address
description (String), (Boolean), private_ip_addresses (List of Objects, Keys are privateIpAddress (String, required) and primary (Boolean)).
device_index (Integer),
secondary_private_ip_address_count (Integer),
associate_public_ip_address (Boolean),
delete_on_termination (Boolean),
groups (List of Strings),
network_interface_id (String),
private_ip_address (String),
subnet_id (String),
associate_ipv6_address (Boolean),
private_ip_addresses (List of Objects, Keys are privateIpAddress (String, required) and primary (Boolean))
type: list type: list
elements: dict elements: dict
on_demand_count: on_demand_count:
description: description:
- Required if risk is not set - Required if risk is not set.
- Number of on demand instances to launch. All other instances will be spot instances.; - Number of on demand instances to launch. All other instances will be spot instances.; Either set this parameter or the risk parameter.
Either set this parameter or the risk parameter
type: int type: int
on_demand_instance_type: on_demand_instance_type:
description: description:
- On-demand instance type that will be provisioned - On-demand instance type that will be provisioned.
type: str type: str
opsworks: opsworks:
description: description:
- The elastigroup OpsWorks integration configuration.; - The elastigroup OpsWorks integration configuration.; Expects the following key - layer_id (String).
Expects the following key -
layer_id (String)
type: dict type: dict
persistence: persistence:
description: description:
- The Stateful elastigroup configuration.; - The Stateful elastigroup configuration.; Accepts the following keys - should_persist_root_device (Boolean), should_persist_block_devices
Accepts the following keys - (Boolean), should_persist_private_ip (Boolean).
should_persist_root_device (Boolean),
should_persist_block_devices (Boolean),
should_persist_private_ip (Boolean)
type: dict type: dict
product: product:
description: description:
- Operation system type. - Operation system type.
- "Available choices are: V(Linux/UNIX), V(SUSE Linux), V(Windows), V(Linux/UNIX (Amazon VPC)), V(SUSE Linux (Amazon VPC))." - 'Available choices are: V(Linux/UNIX), V(SUSE Linux), V(Windows), V(Linux/UNIX (Amazon VPC)), V(SUSE Linux (Amazon VPC)).'
required: true required: true
type: str type: str
rancher: rancher:
description: description:
- The Rancher integration configuration.; - The Rancher integration configuration.; Expects the following keys - version (String), access_key (String), secret_key (String), master_host
Expects the following keys - (String).
version (String),
access_key (String),
secret_key (String),
master_host (String)
type: dict type: dict
right_scale: right_scale:
description: description:
- The Rightscale integration configuration.; - The Rightscale integration configuration.; Expects the following keys - account_id (String), refresh_token (String).
Expects the following keys -
account_id (String),
refresh_token (String)
type: dict type: dict
risk: risk:
@ -311,59 +252,42 @@ options:
roll_config: roll_config:
description: description:
- Roll configuration.; - Roll configuration.
If you would like the group to roll after updating, please use this feature. - If you would like the group to roll after updating, please use this feature.
Accepts the following keys - - Accepts the following keys - batch_size_percentage(Integer, Required), grace_period - (Integer, Required), health_check_type(String, Optional).
batch_size_percentage(Integer, Required),
grace_period - (Integer, Required),
health_check_type(String, Optional)
type: dict type: dict
scheduled_tasks: scheduled_tasks:
description: description:
- A list of hash/dictionaries of scheduled tasks to configure in the elastigroup; - A list of hash/dictionaries of scheduled tasks to configure in the elastigroup, as in V([{"key":"value", "key":"value"}]).
'[{"key":"value", "key":"value"}]'; - 'Keys allowed are: adjustment (Integer), scale_target_capacity (Integer), scale_min_capacity (Integer), scale_max_capacity (Integer),
keys allowed are - adjustment_percentage (Integer), batch_size_percentage (Integer), cron_expression (String), frequency (String), grace_period (Integer),
adjustment (Integer), task_type (String, required), is_enabled (Boolean).'
scale_target_capacity (Integer),
scale_min_capacity (Integer),
scale_max_capacity (Integer),
adjustment_percentage (Integer),
batch_size_percentage (Integer),
cron_expression (String),
frequency (String),
grace_period (Integer),
task_type (String, required),
is_enabled (Boolean)
type: list type: list
elements: dict elements: dict
security_group_ids: security_group_ids:
description: description:
- One or more security group IDs. ; - One or more security group IDs.
In case of update it will override the existing Security Group with the new given array - In case of update it will override the existing Security Group with the new given array.
required: true required: true
type: list type: list
elements: str elements: str
shutdown_script: shutdown_script:
description: description:
- The Base64-encoded shutdown script that executes prior to instance termination. - The Base64-encoded shutdown script that executes prior to instance termination. Encode before setting.
Encode before setting.
type: str type: str
signals: signals:
description: description:
- A list of hash/dictionaries of signals to configure in the elastigroup; - A list of hash/dictionaries of signals to configure in the elastigroup; keys allowed are - name (String, required), timeout (Integer).
keys allowed are -
name (String, required),
timeout (Integer)
type: list type: list
elements: dict elements: dict
spin_up_time: spin_up_time:
description: description:
- Spin up time, in seconds, for the instance - Spin up time, in seconds, for the instance.
type: int type: int
spot_instance_types: spot_instance_types:
@ -378,108 +302,70 @@ options:
- present - present
- absent - absent
description: description:
- Create or delete the elastigroup - Create or delete the elastigroup.
default: present default: present
type: str type: str
tags: tags:
description: description:
- A list of tags to configure in the elastigroup. Please specify list of keys and values (key colon value); - A list of tags to configure in the elastigroup. Please specify list of keys and values (key colon value).
type: list type: list
elements: dict elements: dict
target: target:
description: description:
- The number of instances to launch - The number of instances to launch.
required: true required: true
type: int type: int
target_group_arns: target_group_arns:
description: description:
- List of target group arns instances should be registered to - List of target group arns instances should be registered to.
type: list type: list
elements: str elements: str
tenancy: tenancy:
description: description:
- Dedicated vs shared tenancy. - Dedicated vs shared tenancy.
- "The available choices are: V(default), V(dedicated)." - 'The available choices are: V(default), V(dedicated).'
type: str type: str
terminate_at_end_of_billing_hour: terminate_at_end_of_billing_hour:
description: description:
- Terminate at the end of billing hour - Terminate at the end of billing hour.
type: bool type: bool
unit: unit:
description: description:
- The capacity unit to launch instances by. - The capacity unit to launch instances by.
- "The available choices are: V(instance), V(weight)." - 'The available choices are: V(instance), V(weight).'
type: str type: str
up_scaling_policies: up_scaling_policies:
description: description:
- A list of hash/dictionaries of scaling policies to configure in the elastigroup; - A list of hash/dictionaries of scaling policies to configure in the elastigroup; '[{"key":"value", "key":"value"}]'; keys allowed are
'[{"key":"value", "key":"value"}]'; - policy_name (String, required), namespace (String, required), metric_name (String, required), dimensions (List of Objects, Keys allowed
keys allowed are - are name (String, required) and value (String)), statistic (String, required) evaluation_periods (String, required), period (String, required),
policy_name (String, required), threshold (String, required), cooldown (String, required), unit (String, required), operator (String, required), action_type (String,
namespace (String, required), required), adjustment (String), min_target_capacity (String), target (String), maximum (String), minimum (String).
metric_name (String, required),
dimensions (List of Objects, Keys allowed are name (String, required) and value (String)),
statistic (String, required)
evaluation_periods (String, required),
period (String, required),
threshold (String, required),
cooldown (String, required),
unit (String, required),
operator (String, required),
action_type (String, required),
adjustment (String),
min_target_capacity (String),
target (String),
maximum (String),
minimum (String)
type: list type: list
elements: dict elements: dict
down_scaling_policies: down_scaling_policies:
description: description:
- A list of hash/dictionaries of scaling policies to configure in the elastigroup; - A list of hash/dictionaries of scaling policies to configure in the elastigroup; '[{"key":"value", "key":"value"}]'; keys allowed are
'[{"key":"value", "key":"value"}]'; - policy_name (String, required), namespace (String, required), metric_name (String, required), dimensions ((List of Objects), Keys allowed
keys allowed are - are name (String, required) and value (String)), statistic (String, required), evaluation_periods (String, required), period (String,
policy_name (String, required), required), threshold (String, required), cooldown (String, required), unit (String, required), operator (String, required), action_type
namespace (String, required), (String, required), adjustment (String), max_target_capacity (String), target (String), maximum (String), minimum (String).
metric_name (String, required),
dimensions ((List of Objects), Keys allowed are name (String, required) and value (String)),
statistic (String, required),
evaluation_periods (String, required),
period (String, required),
threshold (String, required),
cooldown (String, required),
unit (String, required),
operator (String, required),
action_type (String, required),
adjustment (String),
max_target_capacity (String),
target (String),
maximum (String),
minimum (String)
type: list type: list
elements: dict elements: dict
target_tracking_policies: target_tracking_policies:
description: description:
- A list of hash/dictionaries of target tracking policies to configure in the elastigroup; - A list of hash/dictionaries of target tracking policies to configure in the elastigroup; '[{"key":"value", "key":"value"}]'; keys allowed
'[{"key":"value", "key":"value"}]'; are - policy_name (String, required), namespace (String, required), source (String, required), metric_name (String, required), statistic
keys allowed are - (String, required), unit (String, required), cooldown (String, required), target (String, required).
policy_name (String, required),
namespace (String, required),
source (String, required),
metric_name (String, required),
statistic (String, required),
unit (String, required),
cooldown (String, required),
target (String, required)
type: list type: list
elements: dict elements: dict
@ -488,8 +374,8 @@ options:
- id - id
- name - name
description: description:
- If your group names are not unique, you may use this feature to update or delete a specific group. - If your group names are not unique, you may use this feature to update or delete a specific group. Whenever this property is set, you
Whenever this property is set, you must set a group_id in order to update or delete a group, otherwise a group will be created. must set a group_id in order to update or delete a group, otherwise a group will be created.
default: name default: name
type: str type: str
@ -500,20 +386,19 @@ options:
utilize_reserved_instances: utilize_reserved_instances:
description: description:
- In case of any available Reserved Instances, - In case of any available Reserved Instances, Elastigroup will utilize your reservations before purchasing Spot instances.
Elastigroup will utilize your reservations before purchasing Spot instances.
type: bool type: bool
wait_for_instances: wait_for_instances:
description: description:
- Whether or not the elastigroup creation / update actions should wait for the instances to spin - Whether or not the elastigroup creation / update actions should wait for the instances to spin.
type: bool type: bool
default: false default: false
wait_timeout: wait_timeout:
description: description:
- How long the module should wait for instances before failing the action.; - How long the module should wait for instances before failing the action.
Only works if wait_for_instances is True. - Only works if O(wait_for_instances=true).
type: int type: int
do_not_update: do_not_update:
@ -538,9 +423,8 @@ options:
description: description:
- Placeholder parameter for future implementation of Elastic Beanstalk configurations. - Placeholder parameter for future implementation of Elastic Beanstalk configurations.
type: dict type: dict
"""
''' EXAMPLES = r"""
EXAMPLES = '''
# Basic configuration YAML example # Basic configuration YAML example
- hosts: localhost - hosts: localhost
@ -793,10 +677,9 @@ EXAMPLES = '''
- image_id - image_id
register: result register: result
- ansible.builtin.debug: var=result - ansible.builtin.debug: var=result
''' """
RETURN = ''' RETURN = r"""
---
instances: instances:
description: List of active elastigroup instances and their details. description: List of active elastigroup instances and their details.
returned: success returned: success
@ -818,8 +701,7 @@ group_id:
returned: success returned: success
type: str type: str
sample: "sig-12345" sample: "sig-12345"
"""
'''
HAS_SPOTINST_SDK = False HAS_SPOTINST_SDK = False
__metaclass__ = type __metaclass__ = type

View File

@ -9,8 +9,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = r''' DOCUMENTATION = r"""
---
short_description: Manage HPE StoreServ 3PAR CPG short_description: Manage HPE StoreServ 3PAR CPG
author: author:
- Farhan Nomani (@farhan7500) - Farhan Nomani (@farhan7500)
@ -43,18 +42,15 @@ options:
type: str type: str
growth_increment: growth_increment:
description: description:
- Specifies the growth increment(in MiB, GiB or TiB) the amount of logical disk storage - Specifies the growth increment(in MiB, GiB or TiB) the amount of logical disk storage created on each auto-grow operation.
created on each auto-grow operation.
type: str type: str
growth_limit: growth_limit:
description: description:
- Specifies that the autogrow operation is limited to the specified - Specifies that the autogrow operation is limited to the specified storage amount that sets the growth limit(in MiB, GiB or TiB).
storage amount that sets the growth limit(in MiB, GiB or TiB).
type: str type: str
growth_warning: growth_warning:
description: description:
- Specifies that the threshold(in MiB, GiB or TiB) of used logical disk space when exceeded - Specifies that the threshold(in MiB, GiB or TiB) of used logical disk space when exceeded results in a warning alert.
results in a warning alert.
type: str type: str
high_availability: high_availability:
choices: choices:
@ -62,8 +58,7 @@ options:
- CAGE - CAGE
- MAG - MAG
description: description:
- Specifies that the layout must support the failure of one port pair, - Specifies that the layout must support the failure of one port pair, one cage, or one magazine.
one cage, or one magazine.
type: str type: str
raid_type: raid_type:
choices: choices:
@ -94,11 +89,10 @@ options:
extends_documentation_fragment: extends_documentation_fragment:
- community.general.hpe3par - community.general.hpe3par
- community.general.attributes - community.general.attributes
"""
'''
EXAMPLES = r''' EXAMPLES = r"""
- name: Create CPG sample_cpg - name: Create CPG sample_cpg
community.general.ss_3par_cpg: community.general.ss_3par_cpg:
storage_system_ip: 10.10.10.1 storage_system_ip: 10.10.10.1
@ -124,10 +118,10 @@ EXAMPLES = r'''
state: absent state: absent
cpg_name: sample_cpg cpg_name: sample_cpg
secure: false secure: false
''' """
RETURN = r''' RETURN = r"""
''' """
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.storage.hpe3par import hpe3par from ansible_collections.community.general.plugins.module_utils.storage.hpe3par import hpe3par

View File

@ -11,8 +11,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = r''' DOCUMENTATION = r"""
---
module: ssh_config module: ssh_config
short_description: Manage SSH config for user short_description: Manage SSH config for user
version_added: '2.0.0' version_added: '2.0.0'
@ -50,8 +49,7 @@ options:
host: host:
description: description:
- The endpoint this configuration is valid for. - The endpoint this configuration is valid for.
- Can be an actual address on the internet or an alias that will - Can be an actual address on the internet or an alias that will connect to the value of O(hostname).
connect to the value of O(hostname).
required: true required: true
type: str type: str
hostname: hostname:
@ -68,17 +66,14 @@ options:
type: str type: str
identity_file: identity_file:
description: description:
- The path to an identity file (SSH private key) that will be used - The path to an identity file (SSH private key) that will be used when connecting to this host.
when connecting to this host.
- File need to exist and have mode V(0600) to be valid. - File need to exist and have mode V(0600) to be valid.
type: path type: path
identities_only: identities_only:
description: description:
- Specifies that SSH should only use the configured authentication - Specifies that SSH should only use the configured authentication identity and certificate files (either the default files, or those explicitly
identity and certificate files (either the default files, or configured in the C(ssh_config) files or passed on the ssh command-line), even if ssh-agent or a PKCS11Provider or SecurityKeyProvider
those explicitly configured in the C(ssh_config) files or passed on offers more identities.
the ssh command-line), even if ssh-agent or a PKCS11Provider or
SecurityKeyProvider offers more identities.
type: bool type: bool
version_added: 8.2.0 version_added: 8.2.0
user_known_hosts_file: user_known_hosts_file:
@ -146,9 +141,9 @@ options:
version_added: 10.1.0 version_added: 10.1.0
requirements: requirements:
- paramiko - paramiko
''' """
EXAMPLES = r''' EXAMPLES = r"""
- name: Add a host in the configuration - name: Add a host in the configuration
community.general.ssh_config: community.general.ssh_config:
user: akasurde user: akasurde
@ -163,9 +158,9 @@ EXAMPLES = r'''
ssh_config_file: "{{ ssh_config_test }}" ssh_config_file: "{{ ssh_config_test }}"
host: "example.com" host: "example.com"
state: absent state: absent
''' """
RETURN = r''' RETURN = r"""
hosts_added: hosts_added:
description: A list of host added. description: A list of host added.
returned: success returned: success
@ -201,7 +196,7 @@ hosts_change_diff:
} }
} }
] ]
''' """
import os import os

View File

@ -8,8 +8,7 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: stacki_host module: stacki_host
short_description: Add or remove host to stacki front-end short_description: Add or remove host to stacki front-end
description: description:
@ -35,8 +34,7 @@ options:
type: str type: str
stacki_password: stacki_password:
description: description:
- Password for authenticating with Stacki API, but if not - Password for authenticating with Stacki API, but if not specified, the environment variable E(stacki_password) is used instead.
specified, the environment variable E(stacki_password) is used instead.
required: true required: true
type: str type: str
stacki_endpoint: stacki_endpoint:
@ -97,9 +95,9 @@ options:
default: private default: private
author: author:
- Hugh Ma (@bbyhuy) <Hugh.Ma@flextronics.com> - Hugh Ma (@bbyhuy) <Hugh.Ma@flextronics.com>
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Add a host named test-1 - name: Add a host named test-1
community.general.stacki_host: community.general.stacki_host:
name: test-1 name: test-1
@ -117,27 +115,27 @@ EXAMPLES = '''
stacki_password: pwd stacki_password: pwd
stacki_endpoint: url stacki_endpoint: url
state: absent state: absent
''' """
RETURN = ''' RETURN = r"""
changed: changed:
description: response to whether or not the api call completed successfully description: Response to whether or not the api call completed successfully.
returned: always returned: always
type: bool type: bool
sample: true sample: true
stdout: stdout:
description: the set of responses from the commands description: The set of responses from the commands.
returned: always returned: always
type: list type: list
sample: ['...', '...'] sample: ['...', '...']
stdout_lines: stdout_lines:
description: the value of stdout split into a list description: The value of stdout split into a list.
returned: always returned: always
type: list type: list
sample: [['...', '...'], ['...'], ['...']] sample: [['...', '...'], ['...'], ['...']]
''' """
import json import json

View File

@ -7,15 +7,14 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
module: statsd module: statsd
short_description: Send metrics to StatsD short_description: Send metrics to StatsD
version_added: 2.1.0 version_added: 2.1.0
description: description:
- The C(statsd) module sends metrics to StatsD. - The C(statsd) module sends metrics to StatsD.
- For more information, see U(https://statsd-metrics.readthedocs.io/en/latest/). - For more information, see U(https://statsd-metrics.readthedocs.io/en/latest/).
- Supported metric types are V(counter) and V(gauge). - Supported metric types are V(counter) and V(gauge). Currently unupported metric types are V(timer), V(set), and V(gaugedelta).
Currently unupported metric types are V(timer), V(set), and V(gaugedelta).
author: "Mark Mercado (@mamercad)" author: "Mark Mercado (@mamercad)"
requirements: requirements:
- statsd - statsd
@ -80,9 +79,9 @@ options:
default: false default: false
description: description:
- If the metric is of type V(gauge), change the value by O(delta). - If the metric is of type V(gauge), change the value by O(delta).
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Increment the metric my_counter by 1 - name: Increment the metric my_counter by 1
community.general.statsd: community.general.statsd:
host: localhost host: localhost
@ -100,7 +99,7 @@ EXAMPLES = '''
metric: my_gauge metric: my_gauge
metric_type: gauge metric_type: gauge
value: 7 value: 7
''' """
from ansible.module_utils.basic import (AnsibleModule, missing_required_lib) from ansible.module_utils.basic import (AnsibleModule, missing_required_lib)

View File

@ -9,17 +9,14 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
module: statusio_maintenance module: statusio_maintenance
short_description: Create maintenance windows for your status.io dashboard short_description: Create maintenance windows for your status.io dashboard
description: description:
- Creates a maintenance window for status.io - Creates or deletes a maintenance window for status.io.
- Deletes a maintenance window for status.io
notes: notes:
- You can use the apiary API url (http://docs.statusio.apiary.io/) to - You can use the apiary API URL (U(http://docs.statusio.apiary.io/)) to capture API traffic.
capture API traffic - Use start_date and start_time with minutes to set future maintenance window.
- Use start_date and start_time with minutes to set future maintenance window
author: Benjamin Copeland (@bhcopeland) <ben@copeland.me.uk> author: Benjamin Copeland (@bhcopeland) <ben@copeland.me.uk>
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
@ -32,12 +29,12 @@ options:
title: title:
type: str type: str
description: description:
- A descriptive title for the maintenance window - A descriptive title for the maintenance window.
default: "A new maintenance window" default: "A new maintenance window"
desc: desc:
type: str type: str
description: description:
- Message describing the maintenance window - Message describing the maintenance window.
default: "Created by Ansible" default: "Created by Ansible"
state: state:
type: str type: str
@ -48,17 +45,17 @@ options:
api_id: api_id:
type: str type: str
description: description:
- Your unique API ID from status.io - Your unique API ID from status.io.
required: true required: true
api_key: api_key:
type: str type: str
description: description:
- Your unique API Key from status.io - Your unique API Key from status.io.
required: true required: true
statuspage: statuspage:
type: str type: str
description: description:
- Your unique StatusPage ID from status.io - Your unique StatusPage ID from status.io.
required: true required: true
url: url:
type: str type: str
@ -69,67 +66,66 @@ options:
type: list type: list
elements: str elements: str
description: description:
- The given name of your component (server name) - The given name of your component (server name).
aliases: ['component'] aliases: ['component']
containers: containers:
type: list type: list
elements: str elements: str
description: description:
- The given name of your container (data center) - The given name of your container (data center).
aliases: ['container'] aliases: ['container']
all_infrastructure_affected: all_infrastructure_affected:
description: description:
- If it affects all components and containers - If it affects all components and containers.
type: bool type: bool
default: false default: false
automation: automation:
description: description:
- Automatically start and end the maintenance window - Automatically start and end the maintenance window.
type: bool type: bool
default: false default: false
maintenance_notify_now: maintenance_notify_now:
description: description:
- Notify subscribers now - Notify subscribers now.
type: bool type: bool
default: false default: false
maintenance_notify_72_hr: maintenance_notify_72_hr:
description: description:
- Notify subscribers 72 hours before maintenance start time - Notify subscribers 72 hours before maintenance start time.
type: bool type: bool
default: false default: false
maintenance_notify_24_hr: maintenance_notify_24_hr:
description: description:
- Notify subscribers 24 hours before maintenance start time - Notify subscribers 24 hours before maintenance start time.
type: bool type: bool
default: false default: false
maintenance_notify_1_hr: maintenance_notify_1_hr:
description: description:
- Notify subscribers 1 hour before maintenance start time - Notify subscribers 1 hour before maintenance start time.
type: bool type: bool
default: false default: false
maintenance_id: maintenance_id:
type: str type: str
description: description:
- The maintenance id number when deleting a maintenance window - The maintenance id number when deleting a maintenance window.
minutes: minutes:
type: int type: int
description: description:
- The length of time in UTC that the maintenance will run - The length of time in UTC that the maintenance will run (starting from playbook runtime).
(starting from playbook runtime)
default: 10 default: 10
start_date: start_date:
type: str type: str
description: description:
- Date maintenance is expected to start (Month/Day/Year) (UTC) - Date maintenance is expected to start (Month/Day/Year) (UTC).
- End Date is worked out from start_date + minutes - End Date is worked out from O(start_date) + O(minutes).
start_time: start_time:
type: str type: str
description: description:
- Time maintenance is expected to start (Hour:Minutes) (UTC) - Time maintenance is expected to start (Hour:Minutes) (UTC).
- End Time is worked out from start_time + minutes - End Time is worked out from O(start_time) + O(minutes).
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Create a maintenance window for 10 minutes on server1, with automation to stop the maintenance - name: Create a maintenance window for 10 minutes on server1, with automation to stop the maintenance
community.general.statusio_maintenance: community.general.statusio_maintenance:
title: Router Upgrade from ansible title: Router Upgrade from ansible
@ -176,10 +172,9 @@ EXAMPLES = '''
api_id: api_id api_id: api_id
api_key: api_key api_key: api_key
state: absent state: absent
"""
'''
# TODO: Add RETURN documentation. # TODO: Add RETURN documentation.
RETURN = ''' # ''' RETURN = """ # """
import datetime import datetime
import json import json

View File

@ -10,8 +10,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: sudoers module: sudoers
short_description: Manage sudoers files short_description: Manage sudoers files
version_added: "4.3.0" version_added: "4.3.0"
@ -100,9 +99,9 @@ options:
default: detect default: detect
choices: [absent, detect, required] choices: [absent, detect, required]
version_added: 5.2.0 version_added: 5.2.0
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Allow the backup user to sudo /usr/local/bin/backup - name: Allow the backup user to sudo /usr/local/bin/backup
community.general.sudoers: community.general.sudoers:
name: allow-backup name: allow-backup
@ -158,7 +157,7 @@ EXAMPLES = '''
user: alice user: alice
commands: /usr/bin/less commands: /usr/bin/less
noexec: true noexec: true
''' """
import os import os
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule

View File

@ -9,12 +9,11 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: supervisorctl module: supervisorctl
short_description: Manage the state of a program or group of programs running via supervisord short_description: Manage the state of a program or group of programs running via supervisord
description: description:
- Manage the state of a program or group of programs running via supervisord - Manage the state of a program or group of programs running via supervisord.
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
attributes: attributes:
@ -33,19 +32,19 @@ options:
config: config:
type: path type: path
description: description:
- The supervisor configuration file path - The supervisor configuration file path.
server_url: server_url:
type: str type: str
description: description:
- URL on which supervisord server is listening - URL on which supervisord server is listening.
username: username:
type: str type: str
description: description:
- username to use for authentication - Username to use for authentication.
password: password:
type: str type: str
description: description:
- password to use for authentication - Password to use for authentication.
state: state:
type: str type: str
description: description:
@ -55,7 +54,7 @@ options:
stop_before_removing: stop_before_removing:
type: bool type: bool
description: description:
- Use O(stop_before_removing=true) to stop the program/group before removing it - Use O(stop_before_removing=true) to stop the program/group before removing it.
required: false required: false
default: false default: false
version_added: 7.5.0 version_added: 7.5.0
@ -66,19 +65,19 @@ options:
supervisorctl_path: supervisorctl_path:
type: path type: path
description: description:
- path to supervisorctl executable - Path to C(supervisorctl) executable.
notes: notes:
- When O(state=present), the module will call C(supervisorctl reread) then C(supervisorctl add) if the program/group does not exist. - When O(state=present), the module will call C(supervisorctl reread) then C(supervisorctl add) if the program/group does not exist.
- When O(state=restarted), the module will call C(supervisorctl update) then call C(supervisorctl restart). - When O(state=restarted), the module will call C(supervisorctl update) then call C(supervisorctl restart).
- When O(state=absent), the module will call C(supervisorctl reread) then C(supervisorctl remove) to remove the target program/group. - When O(state=absent), the module will call C(supervisorctl reread) then C(supervisorctl remove) to remove the target program/group. If the
If the program/group is still running, the action will fail. If you want to stop the program/group before removing, use O(stop_before_removing=true). program/group is still running, the action will fail. If you want to stop the program/group before removing, use O(stop_before_removing=true).
requirements: ["supervisorctl"] requirements: ["supervisorctl"]
author: author:
- "Matt Wright (@mattupstate)" - "Matt Wright (@mattupstate)"
- "Aaron Wang (@inetfuture) <inetfuture@gmail.com>" - "Aaron Wang (@inetfuture) <inetfuture@gmail.com>"
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Manage the state of program to be in started state - name: Manage the state of program to be in started state
community.general.supervisorctl: community.general.supervisorctl:
name: my_app name: my_app
@ -113,7 +112,7 @@ EXAMPLES = '''
community.general.supervisorctl: community.general.supervisorctl:
name: all name: all
state: restarted state: restarted
''' """
import os import os
from ansible.module_utils.basic import AnsibleModule, is_executable from ansible.module_utils.basic import AnsibleModule, is_executable

View File

@ -8,8 +8,7 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: svc module: svc
author: author:
- Brian Coca (@bcoca) - Brian Coca (@bcoca)
@ -31,37 +30,33 @@ options:
required: true required: true
state: state:
description: description:
- V(started)/V(stopped) are idempotent actions that will not run - V(started)/V(stopped) are idempotent actions that will not run commands unless necessary. V(restarted) will always bounce the svc (svc
commands unless necessary. V(restarted) will always bounce the -t) and V(killed) will always bounce the svc (svc -k). V(reloaded) will send a sigusr1 (svc -1). V(once) will run a normally downed svc
svc (svc -t) and V(killed) will always bounce the svc (svc -k). once (svc -o), not really an idempotent operation.
V(reloaded) will send a sigusr1 (svc -1).
V(once) will run a normally downed svc once (svc -o), not really
an idempotent operation.
type: str type: str
choices: [killed, once, reloaded, restarted, started, stopped] choices: [killed, once, reloaded, restarted, started, stopped]
downed: downed:
description: description:
- Should a 'down' file exist or not, if it exists it disables auto startup. - Should a 'down' file exist or not, if it exists it disables auto startup. Defaults to no. Downed does not imply stopped.
Defaults to no. Downed does not imply stopped.
type: bool type: bool
enabled: enabled:
description: description:
- Whether the service is enabled or not, if disabled it also implies stopped. - Whether the service is enabled or not, if disabled it also implies stopped. Take note that a service can be enabled and downed (no auto
Take note that a service can be enabled and downed (no auto restart). restart).
type: bool type: bool
service_dir: service_dir:
description: description:
- Directory svscan watches for services - Directory svscan watches for services.
type: str type: str
default: /service default: /service
service_src: service_src:
description: description:
- Directory where services are defined, the source of symlinks to service_dir. - Directory where services are defined, the source of symlinks to O(service_dir).
type: str type: str
default: /etc/service default: /etc/service
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Start svc dnscache, if not running - name: Start svc dnscache, if not running
community.general.svc: community.general.svc:
name: dnscache name: dnscache
@ -92,7 +87,7 @@ EXAMPLES = '''
name: dnscache name: dnscache
state: reloaded state: reloaded
service_dir: /var/service service_dir: /var/service
''' """
import os import os
import re import re

View File

@ -10,16 +10,13 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: svr4pkg module: svr4pkg
short_description: Manage Solaris SVR4 packages short_description: Manage Solaris SVR4 packages
description: description:
- Manages SVR4 packages on Solaris 10 and 11. - Manages SVR4 packages on Solaris 10 and 11.
- These were the native packages on Solaris <= 10 and are available - These were the native packages on Solaris <= 10 and are available as a legacy feature in Solaris 11.
as a legacy feature in Solaris 11. - Note that this is a very basic packaging system. It will not enforce dependencies on install or remove.
- Note that this is a very basic packaging system. It will not enforce
dependencies on install or remove.
author: "Boyd Adamson (@brontitall)" author: "Boyd Adamson (@brontitall)"
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
@ -47,8 +44,9 @@ options:
src: src:
description: description:
- Specifies the location to install the package from. Required when O(state=present). - Specifies the location to install the package from. Required when O(state=present).
- "Can be any path acceptable to the C(pkgadd) command's C(-d) option. For example: V(somefile.pkg), V(/dir/with/pkgs), V(http:/server/mypkgs.pkg)." - "Can be any path acceptable to the C(pkgadd) command's C(-d) option. For example: V(somefile.pkg), V(/dir/with/pkgs), V(http://server/mypkgs.pkg)."
- If using a file or directory, they must already be accessible by the host. See the M(ansible.builtin.copy) module for a way to get them there. - If using a file or directory, they must already be accessible by the host. See the M(ansible.builtin.copy) module for a way to get them
there.
type: str type: str
proxy: proxy:
description: description:
@ -73,9 +71,9 @@ options:
required: false required: false
type: bool type: bool
default: false default: false
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Install a package from an already copied file - name: Install a package from an already copied file
community.general.svr4pkg: community.general.svr4pkg:
name: CSWcommon name: CSWcommon
@ -106,7 +104,7 @@ EXAMPLES = '''
name: FIREFOX name: FIREFOX
state: absent state: absent
category: true category: true
''' """
import os import os

View File

@ -12,12 +12,11 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: swdepot module: swdepot
short_description: Manage packages with swdepot package manager (HP-UX) short_description: Manage packages with swdepot package manager (HP-UX)
description: description:
- Will install, upgrade and remove packages with swdepot package manager (HP-UX) - Will install, upgrade and remove packages with swdepot package manager (HP-UX).
notes: [] notes: []
author: "Raul Melo (@melodous)" author: "Raul Melo (@melodous)"
extends_documentation_fragment: extends_documentation_fragment:
@ -30,13 +29,13 @@ attributes:
options: options:
name: name:
description: description:
- package name. - Package name.
aliases: [pkg] aliases: [pkg]
required: true required: true
type: str type: str
state: state:
description: description:
- whether to install (V(present), V(latest)), or remove (V(absent)) a package. - Whether to install (V(present), V(latest)), or remove (V(absent)) a package.
required: true required: true
choices: ['present', 'latest', 'absent'] choices: ['present', 'latest', 'absent']
type: str type: str
@ -44,9 +43,9 @@ options:
description: description:
- The source repository from which install or upgrade a package. - The source repository from which install or upgrade a package.
type: str type: str
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Install a package - name: Install a package
community.general.swdepot: community.general.swdepot:
name: unzip-6.0 name: unzip-6.0
@ -63,7 +62,7 @@ EXAMPLES = '''
community.general.swdepot: community.general.swdepot:
name: unzip name: unzip
state: absent state: absent
''' """
import re import re

View File

@ -10,13 +10,11 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = r"""
---
module: swupd module: swupd
short_description: Manages updates and bundles in ClearLinux systems short_description: Manages updates and bundles in ClearLinux systems
description: description:
- Manages updates and bundles with the swupd bundle manager, which is used by the - Manages updates and bundles with the swupd bundle manager, which is used by the Clear Linux Project for Intel Architecture.
Clear Linux Project for Intel Architecture.
author: Alberto Murillo (@albertomurillo) author: Alberto Murillo (@albertomurillo)
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
@ -28,19 +26,16 @@ attributes:
options: options:
contenturl: contenturl:
description: description:
- URL pointing to the contents of available bundles. - URL pointing to the contents of available bundles. If not specified, the contents are retrieved from clearlinux.org.
If not specified, the contents are retrieved from clearlinux.org.
type: str type: str
format: format:
description: description:
- The format suffix for version file downloads. For example [1,2,3,staging,etc]. - The format suffix for version file downloads. For example [1,2,3,staging,etc]. If not specified, the default format is used.
If not specified, the default format is used.
type: str type: str
manifest: manifest:
description: description:
- The manifest contains information about the bundles at certain version of the OS. - The manifest contains information about the bundles at certain version of the OS. Specify a Manifest version to verify against that version
Specify a Manifest version to verify against that version or leave unspecified to or leave unspecified to verify against the current version.
verify against the current version.
aliases: [release, version] aliases: [release, version]
type: int type: int
name: name:
@ -50,8 +45,7 @@ options:
type: str type: str
state: state:
description: description:
- Indicates the desired (I)bundle state. V(present) ensures the bundle - Indicates the desired (I)bundle state. V(present) ensures the bundle is installed while V(absent) ensures the (I)bundle is not installed.
is installed while V(absent) ensures the (I)bundle is not installed.
default: present default: present
choices: [present, absent] choices: [present, absent]
type: str type: str
@ -73,9 +67,9 @@ options:
description: description:
- URL for version string download. - URL for version string download.
type: str type: str
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Update the OS to the latest version - name: Update the OS to the latest version
community.general.swupd: community.general.swupd:
update: true update: true
@ -98,18 +92,18 @@ EXAMPLES = '''
community.general.swupd: community.general.swupd:
verify: true verify: true
manifest: 12920 manifest: 12920
''' """
RETURN = ''' RETURN = r"""
stdout: stdout:
description: stdout of swupd description: C(stdout) of C(swupd).
returned: always returned: always
type: str type: str
stderr: stderr:
description: stderr of swupd description: C(stderr) of C(swupd).
returned: always returned: always
type: str type: str
''' """
import os import os
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule

View File

@ -7,8 +7,7 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = r''' DOCUMENTATION = r"""
---
module: syslogger module: syslogger
short_description: Log messages in the syslog short_description: Log messages in the syslog
description: description:
@ -36,9 +35,8 @@ options:
type: str type: str
description: description:
- Set the log facility. - Set the log facility.
choices: [ "kern", "user", "mail", "daemon", "auth", "lpr", "news", choices: ["kern", "user", "mail", "daemon", "auth", "lpr", "news", "uucp", "cron", "syslog", "local0", "local1", "local2", "local3", "local4",
"uucp", "cron", "syslog", "local0", "local1", "local2", "local5", "local6", "local7"]
"local3", "local4", "local5", "local6", "local7" ]
default: "daemon" default: "daemon"
log_pid: log_pid:
description: description:
@ -53,9 +51,9 @@ options:
version_added: '0.2.0' version_added: '0.2.0'
author: author:
- Tim Rightnour (@garbled1) - Tim Rightnour (@garbled1)
''' """
EXAMPLES = r''' EXAMPLES = r"""
- name: Simple Usage - name: Simple Usage
community.general.syslogger: community.general.syslogger:
msg: "I will end up as daemon.info" msg: "I will end up as daemon.info"
@ -72,36 +70,36 @@ EXAMPLES = r'''
ident: "MyApp" ident: "MyApp"
msg: "I want to believe" msg: "I want to believe"
priority: "alert" priority: "alert"
''' """
RETURN = r''' RETURN = r"""
ident: ident:
description: Name of application sending the message to log description: Name of application sending the message to log.
returned: always returned: always
type: str type: str
sample: "ansible_syslogger" sample: "ansible_syslogger"
version_added: '0.2.0' version_added: '0.2.0'
priority: priority:
description: Priority level description: Priority level.
returned: always returned: always
type: str type: str
sample: "daemon" sample: "daemon"
facility: facility:
description: Syslog facility description: Syslog facility.
returned: always returned: always
type: str type: str
sample: "info" sample: "info"
log_pid: log_pid:
description: Log PID status description: Log PID status.
returned: always returned: always
type: bool type: bool
sample: true sample: true
msg: msg:
description: Message sent to syslog description: Message sent to syslog.
returned: always returned: always
type: str type: str
sample: "Hello from Ansible" sample: "Hello from Ansible"
''' """
import syslog import syslog
import traceback import traceback

View File

@ -8,16 +8,14 @@
from __future__ import (absolute_import, division, print_function) from __future__ import (absolute_import, division, print_function)
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = r''' DOCUMENTATION = r"""
---
module: syspatch module: syspatch
short_description: Manage OpenBSD system patches short_description: Manage OpenBSD system patches
description: description:
- "Manage OpenBSD system patches using syspatch." - Manage OpenBSD system patches using syspatch.
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
@ -36,9 +34,9 @@ options:
author: author:
- Andrew Klaus (@precurse) - Andrew Klaus (@precurse)
''' """
EXAMPLES = ''' EXAMPLES = r"""
- name: Apply all available system patches - name: Apply all available system patches
community.general.syspatch: community.general.syspatch:
@ -58,20 +56,20 @@ EXAMPLES = '''
- name: Reboot if patch requires it - name: Reboot if patch requires it
ansible.builtin.reboot: ansible.builtin.reboot:
when: syspatch.reboot_needed when: syspatch.reboot_needed
''' """
RETURN = r''' RETURN = r"""
rc: rc:
description: The command return code (0 means success) description: The command return code (0 means success).
returned: always returned: always
type: int type: int
stdout: stdout:
description: syspatch standard output. description: C(syspatch) standard output.
returned: always returned: always
type: str type: str
sample: "001_rip6cksum" sample: "001_rip6cksum"
stderr: stderr:
description: syspatch standard error. description: C(syspatch) standard error.
returned: always returned: always
type: str type: str
sample: "syspatch: need root privileges" sample: "syspatch: need root privileges"
@ -80,7 +78,7 @@ reboot_needed:
returned: always returned: always
type: bool type: bool
sample: true sample: true
''' """
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule

View File

@ -9,8 +9,7 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = r''' DOCUMENTATION = r"""
---
author: author:
- David Lundgren (@dlundgren) - David Lundgren (@dlundgren)
module: sysrc module: sysrc
@ -63,10 +62,9 @@ options:
type: str type: str
notes: notes:
- The O(name) cannot contain periods as sysrc does not support OID style names. - The O(name) cannot contain periods as sysrc does not support OID style names.
''' """
EXAMPLES = r''' EXAMPLES = r"""
---
# enable mysql in the /etc/rc.conf # enable mysql in the /etc/rc.conf
- name: Configure mysql pid file - name: Configure mysql pid file
community.general.sysrc: community.general.sysrc:
@ -94,15 +92,15 @@ EXAMPLES = r'''
name: nginx_enable name: nginx_enable
value: "YES" value: "YES"
jail: testjail jail: testjail
''' """
RETURN = r''' RETURN = r"""
changed: changed:
description: Return changed for sysrc actions. description: Return changed for sysrc actions.
returned: always returned: always
type: bool type: bool
sample: true sample: true
''' """
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
import re import re

View File

@ -8,13 +8,12 @@
from __future__ import (absolute_import, division, print_function) from __future__ import (absolute_import, division, print_function)
__metaclass__ = type __metaclass__ = type
DOCUMENTATION = r''' DOCUMENTATION = r"""
---
module: sysupgrade module: sysupgrade
short_description: Manage OpenBSD system upgrades short_description: Manage OpenBSD system upgrades
version_added: 1.1.0 version_added: 1.1.0
description: description:
- Manage OpenBSD system upgrades using sysupgrade. - Manage OpenBSD system upgrades using C(sysupgrade).
extends_documentation_fragment: extends_documentation_fragment:
- community.general.attributes - community.general.attributes
attributes: attributes:
@ -36,26 +35,26 @@ options:
type: bool type: bool
keep_files: keep_files:
description: description:
- Keep the files under /home/_sysupgrade. - Keep the files under C(/home/_sysupgrade).
- By default, the files will be deleted after the upgrade. - By default, the files will be deleted after the upgrade.
default: false default: false
type: bool type: bool
fetch_only: fetch_only:
description: description:
- Fetch and verify files and create /bsd.upgrade but do not reboot. - Fetch and verify files and create C(/bsd.upgrade) but do not reboot.
- Set to V(false) if you want sysupgrade to reboot. This will cause Ansible to error, as it expects the module to exit gracefully. See the examples. - Set to V(false) if you want C(sysupgrade) to reboot. This will cause Ansible to error, as it expects the module to exit gracefully. See the examples.
default: true default: true
type: bool type: bool
installurl: installurl:
description: description:
- OpenBSD mirror top-level URL for fetching an upgrade. - OpenBSD mirror top-level URL for fetching an upgrade.
- By default, the mirror URL is pulled from /etc/installurl. - By default, the mirror URL is pulled from C(/etc/installurl).
type: str type: str
author: author:
- Andrew Klaus (@precurse) - Andrew Klaus (@precurse)
''' """
EXAMPLES = r''' EXAMPLES = r"""
- name: Upgrade to latest release - name: Upgrade to latest release
community.general.sysupgrade: community.general.sysupgrade:
register: sysupgrade register: sysupgrade
@ -77,9 +76,9 @@ EXAMPLES = r'''
community.general.sysupgrade: community.general.sysupgrade:
fetch_only: false fetch_only: false
ignore_errors: true ignore_errors: true
''' """
RETURN = r''' RETURN = r"""
rc: rc:
description: The command return code (0 means success). description: The command return code (0 means success).
returned: always returned: always
@ -93,7 +92,7 @@ stderr:
returned: always returned: always
type: str type: str
sample: "sysupgrade: need root privileges" sample: "sysupgrade: need root privileges"
''' """
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule