[PR #9351/4b23e5ec backport][stable-9] s[o-y]*: normalize docs (#9368)
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>
(cherry picked from commit 4b23e5ecff
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
pull/9375/head
parent
e120c64a21
commit
595c105a29
|
@ -8,8 +8,7 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: solaris_zone
|
||||
short_description: Manage Solaris zones
|
||||
description:
|
||||
|
@ -31,16 +30,15 @@ options:
|
|||
description:
|
||||
- V(present), configure and install the zone.
|
||||
- V(installed), synonym for V(present).
|
||||
- V(running), if the zone already exists, boot it, otherwise, configure and install
|
||||
the zone first, then boot it.
|
||||
- V(running), if the zone already exists, boot it, otherwise, configure and install the zone first, then boot it.
|
||||
- V(started), synonym for V(running).
|
||||
- V(stopped), shutdown a zone.
|
||||
- V(absent), destroy the zone.
|
||||
- V(configured), configure the ready so that it's to be attached.
|
||||
- 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
|
||||
choices: [ absent, attached, configured, detached, installed, present, running, started, stopped ]
|
||||
choices: [absent, attached, configured, detached, installed, present, running, started, stopped]
|
||||
default: present
|
||||
name:
|
||||
description:
|
||||
|
@ -53,8 +51,7 @@ options:
|
|||
required: true
|
||||
path:
|
||||
description:
|
||||
- The path where the zone will be created. This is required when the zone is created, but not
|
||||
used otherwise.
|
||||
- The path where the zone will be created. This is required when the zone is created, but not used otherwise.
|
||||
type: str
|
||||
sparse:
|
||||
description:
|
||||
|
@ -63,32 +60,29 @@ options:
|
|||
default: false
|
||||
root_password:
|
||||
description:
|
||||
- The password hash for the root account. If not specified, the zone's root account
|
||||
will not have a password.
|
||||
- The password hash for the root account. If not specified, the zone's root account will not have a password.
|
||||
type: str
|
||||
config:
|
||||
description:
|
||||
- 'The zonecfg configuration commands for this zone. See zonecfg(1M) for the valid options
|
||||
and syntax. Typically this is a list of options separated by semi-colons or new lines, e.g.
|
||||
"set auto-boot=true;add net;set physical=bge0;set address=10.1.1.1;end"'
|
||||
- The C(zonecfg) configuration commands for this zone. See zonecfg(1M) for the valid options and syntax. Typically this is a list of options
|
||||
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).
|
||||
type: str
|
||||
default: ''
|
||||
create_options:
|
||||
description:
|
||||
- 'Extra options to the zonecfg(1M) create command.'
|
||||
- Extra options to the zonecfg(1M) create command.
|
||||
type: str
|
||||
default: ''
|
||||
install_options:
|
||||
description:
|
||||
- 'Extra options to the zoneadm(1M) install command. To automate Solaris 11 zone creation,
|
||||
use this to specify the profile XML file, e.g. install_options="-c sc_profile.xml"'
|
||||
- Extra options to the zoneadm(1M) install command. To automate Solaris 11 zone creation, use this to specify the profile XML file, for example
|
||||
O(install_options=-c sc_profile.xml).
|
||||
type: str
|
||||
default: ''
|
||||
attach_options:
|
||||
description:
|
||||
- 'Extra options to the zoneadm attach command. For example, this can be used to specify
|
||||
whether a minimum or full update of packages is required and if any packages need to
|
||||
be deleted. For valid values, see zoneadm(1M)'
|
||||
- Extra options to the zoneadm attach command. For example, this can be used to specify whether a minimum or full update of packages is
|
||||
required and if any packages need to be deleted. For valid values, see zoneadm(1M).
|
||||
type: str
|
||||
default: ''
|
||||
timeout:
|
||||
|
@ -96,9 +90,9 @@ options:
|
|||
- Timeout, in seconds, for zone to boot.
|
||||
type: int
|
||||
default: 600
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Create and install a zone, but don't boot it
|
||||
community.general.solaris_zone:
|
||||
name: zone1
|
||||
|
@ -149,7 +143,7 @@ EXAMPLES = '''
|
|||
name: zone1
|
||||
state: attached
|
||||
attach_options: -u
|
||||
'''
|
||||
"""
|
||||
|
||||
import os
|
||||
import platform
|
||||
|
|
|
@ -10,16 +10,14 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: sorcery
|
||||
short_description: Package manager for Source Mage GNU/Linux
|
||||
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)"
|
||||
notes:
|
||||
- When all three components are selected, the update goes by the sequence --
|
||||
Sorcery -> Grimoire(s) -> Spell(s); you cannot override it.
|
||||
- When all three components are selected, the update goes by the sequence -- Sorcery -> Grimoire(s) -> Spell(s); you cannot override it.
|
||||
- Grimoire handling is supported since community.general 7.3.0.
|
||||
requirements:
|
||||
- bash
|
||||
|
@ -35,8 +33,7 @@ options:
|
|||
description:
|
||||
- Name of the spell or grimoire.
|
||||
- Multiple names can be given, separated by commas.
|
||||
- Special value V(*) in conjunction with states V(latest) or
|
||||
V(rebuild) will update or rebuild the whole system respectively
|
||||
- Special value V(*) in conjunction with states V(latest) or V(rebuild) will update or rebuild the whole system respectively.
|
||||
- The alias O(grimoire) was added in community.general 7.3.0.
|
||||
aliases: ["spell", "grimoire"]
|
||||
type: list
|
||||
|
@ -56,21 +53,17 @@ options:
|
|||
description:
|
||||
- Whether to cast, dispel or rebuild a package.
|
||||
- State V(cast) is an equivalent of V(present), not V(latest).
|
||||
- State V(rebuild) implies cast of all specified spells, not only
|
||||
those existed before.
|
||||
- State V(rebuild) implies cast of all specified spells, not only those existed before.
|
||||
choices: ["present", "latest", "absent", "cast", "dispelled", "rebuild"]
|
||||
default: "present"
|
||||
type: str
|
||||
|
||||
depends:
|
||||
description:
|
||||
- Comma-separated list of _optional_ dependencies to build a spell
|
||||
(or make sure it is built) with; use V(+)/V(-) in front of dependency
|
||||
- Comma-separated list of _optional_ dependencies to build a spell (or make sure it is built) with; use V(+)/V(-) in front of dependency
|
||||
to turn it on/off (V(+) is optional though).
|
||||
- This option is ignored if O(name) parameter is equal to V(*) or
|
||||
contains more than one spell.
|
||||
- Providers must be supplied in the form recognized by Sorcery,
|
||||
for example 'V(openssl(SSL\))'.
|
||||
- This option is ignored if O(name) parameter is equal to V(*) or contains more than one spell.
|
||||
- Providers must be supplied in the form recognized by Sorcery, for example 'V(openssl(SSL\))'.
|
||||
type: str
|
||||
|
||||
update:
|
||||
|
@ -93,10 +86,10 @@ options:
|
|||
- Makes sense only in pair with O(update_cache).
|
||||
type: int
|
||||
default: 0
|
||||
'''
|
||||
"""
|
||||
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Make sure spell foo is installed
|
||||
community.general.sorcery:
|
||||
spell: foo
|
||||
|
@ -131,9 +124,9 @@ EXAMPLES = '''
|
|||
depends: "{{ item.depends | default(None) }}"
|
||||
state: present
|
||||
loop:
|
||||
- { spell: 'vifm', depends: '+file,-gtk+2' }
|
||||
- { spell: 'fwknop', depends: 'gpgme' }
|
||||
- { spell: 'pv,tnftp,tor' }
|
||||
- {spell: 'vifm', depends: '+file,-gtk+2'}
|
||||
- {spell: 'fwknop', depends: 'gpgme'}
|
||||
- {spell: 'pv,tnftp,tor'}
|
||||
|
||||
- name: Install the latest version of spell foo using regular glossary
|
||||
community.general.sorcery:
|
||||
|
@ -184,11 +177,11 @@ EXAMPLES = '''
|
|||
- name: Update only Sorcery itself
|
||||
community.general.sorcery:
|
||||
update: true
|
||||
'''
|
||||
"""
|
||||
|
||||
|
||||
RETURN = '''
|
||||
'''
|
||||
RETURN = r"""
|
||||
"""
|
||||
|
||||
|
||||
import datetime
|
||||
|
|
|
@ -9,13 +9,12 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: spectrum_device
|
||||
short_description: Creates/deletes devices in CA Spectrum
|
||||
description:
|
||||
- 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)"
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
|
@ -27,7 +26,7 @@ attributes:
|
|||
options:
|
||||
device:
|
||||
type: str
|
||||
aliases: [ host, name ]
|
||||
aliases: [host, name]
|
||||
required: true
|
||||
description:
|
||||
- IP address of the device.
|
||||
|
@ -52,31 +51,30 @@ options:
|
|||
default: 'present'
|
||||
url:
|
||||
type: str
|
||||
aliases: [ oneclick_url ]
|
||||
aliases: [oneclick_url]
|
||||
required: true
|
||||
description:
|
||||
- HTTP, HTTPS URL of the Oneclick server in the form V((http|https\)://host.domain[:port]).
|
||||
url_username:
|
||||
type: str
|
||||
aliases: [ oneclick_user ]
|
||||
aliases: [oneclick_user]
|
||||
required: true
|
||||
description:
|
||||
- Oneclick user name.
|
||||
url_password:
|
||||
type: str
|
||||
aliases: [ oneclick_password ]
|
||||
aliases: [oneclick_password]
|
||||
required: true
|
||||
description:
|
||||
- Oneclick user password.
|
||||
use_proxy:
|
||||
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
|
||||
type: bool
|
||||
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.
|
||||
default: true
|
||||
type: bool
|
||||
agentport:
|
||||
|
@ -88,9 +86,9 @@ options:
|
|||
notes:
|
||||
- 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.
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Add device to CA Spectrum
|
||||
local_action:
|
||||
module: spectrum_device
|
||||
|
@ -113,15 +111,15 @@ EXAMPLES = '''
|
|||
oneclick_password: password
|
||||
use_proxy: false
|
||||
state: absent
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
device:
|
||||
description: device data when state = present
|
||||
description: Device data when O(state=present).
|
||||
returned: success
|
||||
type: dict
|
||||
sample: {'model_handle': '0x1007ab', 'landscape': '0x100000', 'address': '10.10.5.1'}
|
||||
'''
|
||||
"""
|
||||
|
||||
from socket import gethostbyname, gaierror
|
||||
import xml.etree.ElementTree as ET
|
||||
|
|
|
@ -9,8 +9,7 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: spectrum_model_attrs
|
||||
short_description: Enforce a model's attributes in CA Spectrum
|
||||
description:
|
||||
|
@ -48,8 +47,7 @@ options:
|
|||
aliases: [password]
|
||||
use_proxy:
|
||||
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
|
||||
required: false
|
||||
type: bool
|
||||
|
@ -65,8 +63,8 @@ options:
|
|||
required: true
|
||||
validate_certs:
|
||||
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
|
||||
man-in-the-middle attack happening.
|
||||
- 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 man-in-the-middle attack happening.
|
||||
type: bool
|
||||
default: true
|
||||
required: false
|
||||
|
@ -82,25 +80,25 @@ options:
|
|||
description:
|
||||
- Attribute name OR hex ID.
|
||||
- 'Currently defined names are:'
|
||||
- ' C(App_Manufacturer) (C(0x230683))'
|
||||
- ' C(CollectionsModelNameString) (C(0x12adb))'
|
||||
- ' C(Condition) (C(0x1000a))'
|
||||
- ' C(Criticality) (C(0x1290c))'
|
||||
- ' C(DeviceType) (C(0x23000e))'
|
||||
- ' C(isManaged) (C(0x1295d))'
|
||||
- ' C(Model_Class) (C(0x11ee8))'
|
||||
- ' C(Model_Handle) (C(0x129fa))'
|
||||
- ' C(Model_Name) (C(0x1006e))'
|
||||
- ' C(Modeltype_Handle) (C(0x10001))'
|
||||
- ' C(Modeltype_Name) (C(0x10000))'
|
||||
- ' C(Network_Address) (C(0x12d7f))'
|
||||
- ' C(Notes) (C(0x11564))'
|
||||
- ' C(ServiceDesk_Asset_ID) (C(0x12db9))'
|
||||
- ' C(TopologyModelNameString) (C(0x129e7))'
|
||||
- ' C(sysDescr) (C(0x10052))'
|
||||
- ' C(sysName) (C(0x10b5b))'
|
||||
- ' C(Vendor_Name) (C(0x11570))'
|
||||
- ' C(Description) (C(0x230017))'
|
||||
- C(App_Manufacturer) (C(0x230683));
|
||||
- C(CollectionsModelNameString) (C(0x12adb));
|
||||
- C(Condition) (C(0x1000a));
|
||||
- C(Criticality) (C(0x1290c));
|
||||
- C(DeviceType) (C(0x23000e));
|
||||
- C(isManaged) (C(0x1295d));
|
||||
- C(Model_Class) (C(0x11ee8));
|
||||
- C(Model_Handle) (C(0x129fa));
|
||||
- C(Model_Name) (C(0x1006e));
|
||||
- C(Modeltype_Handle) (C(0x10001));
|
||||
- C(Modeltype_Name) (C(0x10000));
|
||||
- C(Network_Address) (C(0x12d7f));
|
||||
- C(Notes) (C(0x11564));
|
||||
- C(ServiceDesk_Asset_ID) (C(0x12db9));
|
||||
- C(TopologyModelNameString) (C(0x129e7));
|
||||
- C(sysDescr) (C(0x10052));
|
||||
- C(sysName) (C(0x10b5b));
|
||||
- C(Vendor_Name) (C(0x11570));
|
||||
- C(Description) (C(0x230017)).
|
||||
- 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.'
|
||||
type: str
|
||||
|
@ -110,9 +108,9 @@ options:
|
|||
- Attribute value. Empty strings should be V("") or V(null).
|
||||
type: str
|
||||
required: true
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = r'''
|
||||
EXAMPLES = r"""
|
||||
- name: Enforce maintenance mode for modelxyz01 with a note about why
|
||||
community.general.spectrum_model_attrs:
|
||||
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) }}"
|
||||
delegate_to: localhost
|
||||
register: spectrum_model_attrs_status
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = r'''
|
||||
RETURN = r"""
|
||||
msg:
|
||||
description: Informational message on the job result.
|
||||
type: str
|
||||
|
@ -140,11 +138,8 @@ changed_attrs:
|
|||
description: Dictionary of changed name or hex IDs (whichever was specified) to their new corresponding values.
|
||||
type: dict
|
||||
returned: always
|
||||
sample: {
|
||||
"Notes": "MM set on 2021-02-03T22:04:02Z via CO CO9999 by tgates",
|
||||
"isManaged": "true"
|
||||
}
|
||||
'''
|
||||
sample: {"Notes": "MM set on 2021-02-03T22:04:02Z via CO CO9999 by tgates", "isManaged": "true"}
|
||||
"""
|
||||
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
|
|
@ -5,19 +5,15 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: spotinst_aws_elastigroup
|
||||
short_description: Create, update or delete Spotinst AWS Elastigroups
|
||||
author: Spotinst (@talzur)
|
||||
description:
|
||||
- Can create, update, or delete Spotinst AWS Elastigroups
|
||||
Launch configuration is part of the elastigroup configuration,
|
||||
so no additional modules are necessary for handling the launch configuration.
|
||||
You will have to have a credentials file in this location - <home>/.spotinst/credentials
|
||||
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-
|
||||
- Can create, update, or delete Spotinst AWS Elastigroups Launch configuration is part of the elastigroup configuration, so no additional modules
|
||||
are necessary for handling the launch configuration. You will have to have a credentials file in this location - C($HOME/.spotinst/credentials).
|
||||
The credentials file must contain a row that looks like this C(token = <YOUR TOKEN>).
|
||||
- Full documentation available at U(https://help.spotinst.com/hc/en-us/articles/115003530285-Ansible-).
|
||||
requirements:
|
||||
- spotinst_sdk >= 1.0.38
|
||||
extends_documentation_fragment:
|
||||
|
@ -38,62 +34,43 @@ options:
|
|||
account_id:
|
||||
description:
|
||||
- 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
|
||||
|
||||
token:
|
||||
description:
|
||||
- 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 path.
|
||||
- 'When not specified, the module will try to obtain it, in that order, from: environment variable E(SPOTINST_TOKEN), or from the credentials
|
||||
path.'
|
||||
type: str
|
||||
|
||||
availability_vs_cost:
|
||||
description:
|
||||
- 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
|
||||
type: str
|
||||
|
||||
availability_zones:
|
||||
description:
|
||||
- A list of hash/dictionaries of Availability Zones that are configured in the elastigroup;
|
||||
'[{"key":"value", "key":"value"}]';
|
||||
keys allowed are
|
||||
name (String),
|
||||
subnet_id (String),
|
||||
placement_group_name (String),
|
||||
- A list of hash/dictionaries of Availability Zones that are configured in the elastigroup; '[{"key":"value", "key":"value"}]'; keys allowed
|
||||
are name (String), subnet_id (String), placement_group_name (String),.
|
||||
required: true
|
||||
type: list
|
||||
elements: dict
|
||||
|
||||
block_device_mappings:
|
||||
description:
|
||||
- A list of hash/dictionaries of Block Device Mappings for elastigroup instances;
|
||||
You can specify virtual devices and EBS volumes.;
|
||||
'[{"key":"value", "key":"value"}]';
|
||||
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))
|
||||
- A list of hash/dictionaries of Block Device Mappings for elastigroup instances; You can specify virtual devices and EBS volumes.; '[{"key":"value",
|
||||
"key":"value"}]'; 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
|
||||
elements: dict
|
||||
|
||||
chef:
|
||||
description:
|
||||
- The Chef integration configuration.;
|
||||
Expects the following keys - chef_server (String),
|
||||
organization (String),
|
||||
user (String),
|
||||
pem_key (String),
|
||||
chef_version (String)
|
||||
- The Chef integration configuration.; Expects the following keys - chef_server (String), organization (String), user (String), pem_key
|
||||
(String), chef_version (String).
|
||||
type: dict
|
||||
|
||||
draining_timeout:
|
||||
|
@ -103,36 +80,30 @@ options:
|
|||
|
||||
ebs_optimized:
|
||||
description:
|
||||
- Enable EBS optimization for supported instances which are not enabled by default.;
|
||||
Note - additional charges will be applied.
|
||||
- Enable EBS optimization for supported instances which are not enabled by default.; Note - additional charges will be applied.
|
||||
type: bool
|
||||
|
||||
ebs_volume_pool:
|
||||
description:
|
||||
- A list of hash/dictionaries of EBS devices to reattach to the elastigroup when available;
|
||||
'[{"key":"value", "key":"value"}]';
|
||||
keys allowed are -
|
||||
volume_ids (List of Strings),
|
||||
device_name (String)
|
||||
- A list of hash/dictionaries of EBS devices to reattach to the elastigroup when available; '[{"key":"value", "key":"value"}]'; keys allowed
|
||||
are - volume_ids (List of Strings), device_name (String).
|
||||
type: list
|
||||
elements: dict
|
||||
|
||||
ecs:
|
||||
description:
|
||||
- The ECS integration configuration.;
|
||||
Expects the following key -
|
||||
cluster_name (String)
|
||||
- The ECS integration configuration.; Expects the following key - cluster_name (String).
|
||||
type: dict
|
||||
|
||||
elastic_ips:
|
||||
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
|
||||
elements: str
|
||||
|
||||
fallback_to_od:
|
||||
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
|
||||
|
||||
health_check_grace_period:
|
||||
|
@ -149,159 +120,129 @@ options:
|
|||
health_check_type:
|
||||
description:
|
||||
- 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
|
||||
|
||||
iam_role_name:
|
||||
description:
|
||||
- The instance profile iamRole name
|
||||
- Only use iam_role_arn, or iam_role_name
|
||||
- The instance profile iamRole name.
|
||||
- Only use O(iam_role_arn) or O(iam_role_name).
|
||||
type: str
|
||||
|
||||
iam_role_arn:
|
||||
description:
|
||||
- The instance profile iamRole arn
|
||||
- Only use iam_role_arn, or iam_role_name
|
||||
- The instance profile iamRole arn.
|
||||
- Only use O(iam_role_arn) or O(iam_role_name).
|
||||
type: str
|
||||
|
||||
id:
|
||||
description:
|
||||
- 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.
|
||||
- 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.
|
||||
When this is set, and the uniqueness_by field is set, the group will either be updated or deleted, but not created.
|
||||
type: str
|
||||
|
||||
image_id:
|
||||
description:
|
||||
- The image Id used to launch the instance.;
|
||||
In case of conflict between Instance type and image type, an error will be returned
|
||||
- The image Id used to launch the instance.; In case of conflict between Instance type and image type, an error will be returned.
|
||||
required: true
|
||||
type: str
|
||||
|
||||
key_pair:
|
||||
description:
|
||||
- Specify a Key Pair to attach to the instances
|
||||
- Specify a Key Pair to attach to the instances.
|
||||
type: str
|
||||
|
||||
kubernetes:
|
||||
description:
|
||||
- The Kubernetes integration configuration.
|
||||
Expects the following keys -
|
||||
api_server (String),
|
||||
token (String)
|
||||
- The Kubernetes integration configuration. Expects the following keys - api_server (String), token (String).
|
||||
type: dict
|
||||
|
||||
lifetime_period:
|
||||
description:
|
||||
- Lifetime period
|
||||
- Lifetime period.
|
||||
type: int
|
||||
|
||||
load_balancers:
|
||||
description:
|
||||
- List of classic ELB names
|
||||
- List of classic ELB names.
|
||||
type: list
|
||||
elements: str
|
||||
|
||||
max_size:
|
||||
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
|
||||
type: int
|
||||
|
||||
mesosphere:
|
||||
description:
|
||||
- The Mesosphere integration configuration.
|
||||
Expects the following key -
|
||||
api_server (String)
|
||||
- The Mesosphere integration configuration. Expects the following key - api_server (String).
|
||||
type: dict
|
||||
|
||||
min_size:
|
||||
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
|
||||
type: int
|
||||
|
||||
monitoring:
|
||||
description:
|
||||
- Describes whether instance Enhanced Monitoring is enabled
|
||||
- Describes whether instance Enhanced Monitoring is enabled.
|
||||
type: str
|
||||
|
||||
name:
|
||||
description:
|
||||
- Unique name for elastigroup to be created, updated or deleted
|
||||
- Unique name for elastigroup to be created, updated or deleted.
|
||||
required: true
|
||||
type: str
|
||||
|
||||
network_interfaces:
|
||||
description:
|
||||
- A list of hash/dictionaries of network interfaces to add to the elastigroup;
|
||||
'[{"key":"value", "key":"value"}]';
|
||||
keys allowed are -
|
||||
description (String),
|
||||
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))
|
||||
- A list of hash/dictionaries of network interfaces to add to the elastigroup; '[{"key":"value", "key":"value"}]'; keys allowed are - description
|
||||
(String), 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
|
||||
elements: dict
|
||||
|
||||
on_demand_count:
|
||||
description:
|
||||
- Required if risk is not set
|
||||
- Number of on demand instances to launch. All other instances will be spot instances.;
|
||||
Either set this parameter or the risk parameter
|
||||
- Required if risk is not set.
|
||||
- Number of on demand instances to launch. All other instances will be spot instances.; Either set this parameter or the risk parameter.
|
||||
type: int
|
||||
|
||||
on_demand_instance_type:
|
||||
description:
|
||||
- On-demand instance type that will be provisioned
|
||||
- On-demand instance type that will be provisioned.
|
||||
type: str
|
||||
|
||||
opsworks:
|
||||
description:
|
||||
- The elastigroup OpsWorks integration configuration.;
|
||||
Expects the following key -
|
||||
layer_id (String)
|
||||
- The elastigroup OpsWorks integration configuration.; Expects the following key - layer_id (String).
|
||||
type: dict
|
||||
|
||||
persistence:
|
||||
description:
|
||||
- The Stateful elastigroup configuration.;
|
||||
Accepts the following keys -
|
||||
should_persist_root_device (Boolean),
|
||||
should_persist_block_devices (Boolean),
|
||||
should_persist_private_ip (Boolean)
|
||||
- The Stateful elastigroup configuration.; Accepts the following keys - should_persist_root_device (Boolean), should_persist_block_devices
|
||||
(Boolean), should_persist_private_ip (Boolean).
|
||||
type: dict
|
||||
|
||||
product:
|
||||
description:
|
||||
- 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
|
||||
type: str
|
||||
|
||||
rancher:
|
||||
description:
|
||||
- The Rancher integration configuration.;
|
||||
Expects the following keys -
|
||||
version (String),
|
||||
access_key (String),
|
||||
secret_key (String),
|
||||
master_host (String)
|
||||
- The Rancher integration configuration.; Expects the following keys - version (String), access_key (String), secret_key (String), master_host
|
||||
(String).
|
||||
type: dict
|
||||
|
||||
right_scale:
|
||||
description:
|
||||
- The Rightscale integration configuration.;
|
||||
Expects the following keys -
|
||||
account_id (String),
|
||||
refresh_token (String)
|
||||
- The Rightscale integration configuration.; Expects the following keys - account_id (String), refresh_token (String).
|
||||
type: dict
|
||||
|
||||
risk:
|
||||
|
@ -311,59 +252,42 @@ options:
|
|||
|
||||
roll_config:
|
||||
description:
|
||||
- Roll configuration.;
|
||||
If you would like the group to roll after updating, please use this feature.
|
||||
Accepts the following keys -
|
||||
batch_size_percentage(Integer, Required),
|
||||
grace_period - (Integer, Required),
|
||||
health_check_type(String, Optional)
|
||||
- Roll configuration.
|
||||
- If you would like the group to roll after updating, please use this feature.
|
||||
- Accepts the following keys - batch_size_percentage(Integer, Required), grace_period - (Integer, Required), health_check_type(String, Optional).
|
||||
type: dict
|
||||
|
||||
scheduled_tasks:
|
||||
description:
|
||||
- A list of hash/dictionaries of scheduled tasks to configure in the elastigroup;
|
||||
'[{"key":"value", "key":"value"}]';
|
||||
keys allowed are -
|
||||
adjustment (Integer),
|
||||
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)
|
||||
- A list of hash/dictionaries of scheduled tasks to configure in the elastigroup, as in V([{"key":"value", "key":"value"}]).
|
||||
- 'Keys allowed are: adjustment (Integer), 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
|
||||
elements: dict
|
||||
|
||||
security_group_ids:
|
||||
description:
|
||||
- One or more security group IDs. ;
|
||||
In case of update it will override the existing Security Group with the new given array
|
||||
- One or more security group IDs.
|
||||
- In case of update it will override the existing Security Group with the new given array.
|
||||
required: true
|
||||
type: list
|
||||
elements: str
|
||||
|
||||
shutdown_script:
|
||||
description:
|
||||
- The Base64-encoded shutdown script that executes prior to instance termination.
|
||||
Encode before setting.
|
||||
- The Base64-encoded shutdown script that executes prior to instance termination. Encode before setting.
|
||||
type: str
|
||||
|
||||
signals:
|
||||
description:
|
||||
- A list of hash/dictionaries of signals to configure in the elastigroup;
|
||||
keys allowed are -
|
||||
name (String, required),
|
||||
timeout (Integer)
|
||||
- A list of hash/dictionaries of signals to configure in the elastigroup; keys allowed are - name (String, required), timeout (Integer).
|
||||
type: list
|
||||
elements: dict
|
||||
|
||||
spin_up_time:
|
||||
description:
|
||||
- Spin up time, in seconds, for the instance
|
||||
- Spin up time, in seconds, for the instance.
|
||||
type: int
|
||||
|
||||
spot_instance_types:
|
||||
|
@ -378,108 +302,70 @@ options:
|
|||
- present
|
||||
- absent
|
||||
description:
|
||||
- Create or delete the elastigroup
|
||||
- Create or delete the elastigroup.
|
||||
default: present
|
||||
type: str
|
||||
|
||||
tags:
|
||||
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
|
||||
elements: dict
|
||||
|
||||
target:
|
||||
description:
|
||||
- The number of instances to launch
|
||||
- The number of instances to launch.
|
||||
required: true
|
||||
type: int
|
||||
|
||||
target_group_arns:
|
||||
description:
|
||||
- List of target group arns instances should be registered to
|
||||
- List of target group arns instances should be registered to.
|
||||
type: list
|
||||
elements: str
|
||||
|
||||
tenancy:
|
||||
description:
|
||||
- Dedicated vs shared tenancy.
|
||||
- "The available choices are: V(default), V(dedicated)."
|
||||
- 'The available choices are: V(default), V(dedicated).'
|
||||
type: str
|
||||
|
||||
terminate_at_end_of_billing_hour:
|
||||
description:
|
||||
- Terminate at the end of billing hour
|
||||
- Terminate at the end of billing hour.
|
||||
type: bool
|
||||
|
||||
unit:
|
||||
description:
|
||||
- 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
|
||||
|
||||
up_scaling_policies:
|
||||
description:
|
||||
- A list of hash/dictionaries of scaling policies to configure in the elastigroup;
|
||||
'[{"key":"value", "key":"value"}]';
|
||||
keys allowed are -
|
||||
policy_name (String, required),
|
||||
namespace (String, required),
|
||||
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)
|
||||
- A list of hash/dictionaries of scaling policies to configure in the elastigroup; '[{"key":"value", "key":"value"}]'; keys allowed are
|
||||
- policy_name (String, required), namespace (String, required), 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
|
||||
elements: dict
|
||||
|
||||
down_scaling_policies:
|
||||
description:
|
||||
- A list of hash/dictionaries of scaling policies to configure in the elastigroup;
|
||||
'[{"key":"value", "key":"value"}]';
|
||||
keys allowed are -
|
||||
policy_name (String, required),
|
||||
namespace (String, required),
|
||||
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)
|
||||
- A list of hash/dictionaries of scaling policies to configure in the elastigroup; '[{"key":"value", "key":"value"}]'; keys allowed are
|
||||
- policy_name (String, required), namespace (String, required), 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
|
||||
elements: dict
|
||||
|
||||
target_tracking_policies:
|
||||
description:
|
||||
- A list of hash/dictionaries of target tracking policies to configure in the elastigroup;
|
||||
'[{"key":"value", "key":"value"}]';
|
||||
keys allowed are -
|
||||
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)
|
||||
- A list of hash/dictionaries of target tracking policies to configure in the elastigroup; '[{"key":"value", "key":"value"}]'; keys allowed
|
||||
are - 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
|
||||
elements: dict
|
||||
|
||||
|
@ -488,8 +374,8 @@ options:
|
|||
- id
|
||||
- name
|
||||
description:
|
||||
- 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 must set a group_id in order to update or delete a group, otherwise a group will be created.
|
||||
- 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
|
||||
must set a group_id in order to update or delete a group, otherwise a group will be created.
|
||||
default: name
|
||||
type: str
|
||||
|
||||
|
@ -500,20 +386,19 @@ options:
|
|||
|
||||
utilize_reserved_instances:
|
||||
description:
|
||||
- In case of any available Reserved Instances,
|
||||
Elastigroup will utilize your reservations before purchasing Spot instances.
|
||||
- In case of any available Reserved Instances, Elastigroup will utilize your reservations before purchasing Spot instances.
|
||||
type: bool
|
||||
|
||||
wait_for_instances:
|
||||
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
|
||||
default: false
|
||||
|
||||
wait_timeout:
|
||||
description:
|
||||
- How long the module should wait for instances before failing the action.;
|
||||
Only works if wait_for_instances is True.
|
||||
- How long the module should wait for instances before failing the action.
|
||||
- Only works if O(wait_for_instances=true).
|
||||
type: int
|
||||
|
||||
do_not_update:
|
||||
|
@ -538,9 +423,8 @@ options:
|
|||
description:
|
||||
- Placeholder parameter for future implementation of Elastic Beanstalk configurations.
|
||||
type: dict
|
||||
|
||||
'''
|
||||
EXAMPLES = '''
|
||||
"""
|
||||
EXAMPLES = r"""
|
||||
# Basic configuration YAML example
|
||||
|
||||
- hosts: localhost
|
||||
|
@ -793,10 +677,9 @@ EXAMPLES = '''
|
|||
- image_id
|
||||
register: result
|
||||
- ansible.builtin.debug: var=result
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
---
|
||||
RETURN = r"""
|
||||
instances:
|
||||
description: List of active elastigroup instances and their details.
|
||||
returned: success
|
||||
|
@ -818,8 +701,7 @@ group_id:
|
|||
returned: success
|
||||
type: str
|
||||
sample: "sig-12345"
|
||||
|
||||
'''
|
||||
"""
|
||||
|
||||
HAS_SPOTINST_SDK = False
|
||||
__metaclass__ = type
|
||||
|
|
|
@ -9,8 +9,7 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
short_description: Manage HPE StoreServ 3PAR CPG
|
||||
author:
|
||||
- Farhan Nomani (@farhan7500)
|
||||
|
@ -43,18 +42,15 @@ options:
|
|||
type: str
|
||||
growth_increment:
|
||||
description:
|
||||
- Specifies the growth increment(in MiB, GiB or TiB) the amount of logical disk storage
|
||||
created on each auto-grow operation.
|
||||
- Specifies the growth increment(in MiB, GiB or TiB) the amount of logical disk storage created on each auto-grow operation.
|
||||
type: str
|
||||
growth_limit:
|
||||
description:
|
||||
- Specifies that the autogrow operation is limited to the specified
|
||||
storage amount that sets the growth limit(in MiB, GiB or TiB).
|
||||
- Specifies that the autogrow operation is limited to the specified storage amount that sets the growth limit(in MiB, GiB or TiB).
|
||||
type: str
|
||||
growth_warning:
|
||||
description:
|
||||
- Specifies that the threshold(in MiB, GiB or TiB) of used logical disk space when exceeded
|
||||
results in a warning alert.
|
||||
- Specifies that the threshold(in MiB, GiB or TiB) of used logical disk space when exceeded results in a warning alert.
|
||||
type: str
|
||||
high_availability:
|
||||
choices:
|
||||
|
@ -62,8 +58,7 @@ options:
|
|||
- CAGE
|
||||
- MAG
|
||||
description:
|
||||
- Specifies that the layout must support the failure of one port pair,
|
||||
one cage, or one magazine.
|
||||
- Specifies that the layout must support the failure of one port pair, one cage, or one magazine.
|
||||
type: str
|
||||
raid_type:
|
||||
choices:
|
||||
|
@ -92,13 +87,12 @@ options:
|
|||
type: bool
|
||||
default: false
|
||||
extends_documentation_fragment:
|
||||
- community.general.hpe3par
|
||||
- community.general.attributes
|
||||
|
||||
'''
|
||||
- community.general.hpe3par
|
||||
- community.general.attributes
|
||||
"""
|
||||
|
||||
|
||||
EXAMPLES = r'''
|
||||
EXAMPLES = r"""
|
||||
- name: Create CPG sample_cpg
|
||||
community.general.ss_3par_cpg:
|
||||
storage_system_ip: 10.10.10.1
|
||||
|
@ -124,10 +118,10 @@ EXAMPLES = r'''
|
|||
state: absent
|
||||
cpg_name: sample_cpg
|
||||
secure: false
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = r'''
|
||||
'''
|
||||
RETURN = r"""
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible_collections.community.general.plugins.module_utils.storage.hpe3par import hpe3par
|
||||
|
|
|
@ -11,8 +11,7 @@ from __future__ import absolute_import, division, print_function
|
|||
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: ssh_config
|
||||
short_description: Manage SSH config for user
|
||||
version_added: '2.0.0'
|
||||
|
@ -33,7 +32,7 @@ options:
|
|||
description:
|
||||
- Whether a host entry should exist or not.
|
||||
default: present
|
||||
choices: [ 'present', 'absent' ]
|
||||
choices: ['present', 'absent']
|
||||
type: str
|
||||
user:
|
||||
description:
|
||||
|
@ -50,8 +49,7 @@ options:
|
|||
host:
|
||||
description:
|
||||
- The endpoint this configuration is valid for.
|
||||
- Can be an actual address on the internet or an alias that will
|
||||
connect to the value of O(hostname).
|
||||
- Can be an actual address on the internet or an alias that will connect to the value of O(hostname).
|
||||
required: true
|
||||
type: str
|
||||
hostname:
|
||||
|
@ -68,17 +66,14 @@ options:
|
|||
type: str
|
||||
identity_file:
|
||||
description:
|
||||
- The path to an identity file (SSH private key) that will be used
|
||||
when connecting to this host.
|
||||
- The path to an identity file (SSH private key) that will be used when connecting to this host.
|
||||
- File need to exist and have mode V(0600) to be valid.
|
||||
type: path
|
||||
identities_only:
|
||||
description:
|
||||
- Specifies that SSH should only use the configured authentication
|
||||
identity and certificate files (either the default files, or
|
||||
those explicitly configured in the C(ssh_config) files or passed on
|
||||
the ssh command-line), even if ssh-agent or a PKCS11Provider or
|
||||
SecurityKeyProvider offers more identities.
|
||||
- Specifies that SSH should only use the configured authentication identity and certificate files (either the default files, or those explicitly
|
||||
configured in the C(ssh_config) files or passed on the ssh command-line), even if ssh-agent or a PKCS11Provider or SecurityKeyProvider
|
||||
offers more identities.
|
||||
type: bool
|
||||
version_added: 8.2.0
|
||||
user_known_hosts_file:
|
||||
|
@ -89,7 +84,7 @@ options:
|
|||
description:
|
||||
- Whether to strictly check the host key when doing connections to the remote host.
|
||||
- The value V(accept-new) is supported since community.general 8.6.0.
|
||||
choices: [ 'yes', 'no', 'ask', 'accept-new' ]
|
||||
choices: ['yes', 'no', 'ask', 'accept-new']
|
||||
type: str
|
||||
proxycommand:
|
||||
description:
|
||||
|
@ -126,7 +121,7 @@ options:
|
|||
controlmaster:
|
||||
description:
|
||||
- Sets the C(ControlMaster) option.
|
||||
choices: [ 'yes', 'no', 'ask', 'auto', 'autoask' ]
|
||||
choices: ['yes', 'no', 'ask', 'auto', 'autoask']
|
||||
type: str
|
||||
version_added: 8.1.0
|
||||
controlpath:
|
||||
|
@ -140,10 +135,10 @@ options:
|
|||
type: str
|
||||
version_added: 8.1.0
|
||||
requirements:
|
||||
- paramiko
|
||||
'''
|
||||
- paramiko
|
||||
"""
|
||||
|
||||
EXAMPLES = r'''
|
||||
EXAMPLES = r"""
|
||||
- name: Add a host in the configuration
|
||||
community.general.ssh_config:
|
||||
user: akasurde
|
||||
|
@ -158,9 +153,9 @@ EXAMPLES = r'''
|
|||
ssh_config_file: "{{ ssh_config_test }}"
|
||||
host: "example.com"
|
||||
state: absent
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = r'''
|
||||
RETURN = r"""
|
||||
hosts_added:
|
||||
description: A list of host added.
|
||||
returned: success
|
||||
|
@ -196,7 +191,7 @@ hosts_change_diff:
|
|||
}
|
||||
}
|
||||
]
|
||||
'''
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: stacki_host
|
||||
short_description: Add or remove host to stacki front-end
|
||||
description:
|
||||
|
@ -35,8 +34,7 @@ options:
|
|||
type: str
|
||||
stacki_password:
|
||||
description:
|
||||
- Password for authenticating with Stacki API, but if not
|
||||
specified, the environment variable E(stacki_password) is used instead.
|
||||
- Password for authenticating with Stacki API, but if not specified, the environment variable E(stacki_password) is used instead.
|
||||
required: true
|
||||
type: str
|
||||
stacki_endpoint:
|
||||
|
@ -68,7 +66,7 @@ options:
|
|||
description:
|
||||
- Set value to the desired state for the specified host.
|
||||
type: str
|
||||
choices: [ absent, present ]
|
||||
choices: [absent, present]
|
||||
default: present
|
||||
appliance:
|
||||
description:
|
||||
|
@ -96,10 +94,10 @@ options:
|
|||
type: str
|
||||
default: private
|
||||
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
|
||||
community.general.stacki_host:
|
||||
name: test-1
|
||||
|
@ -117,27 +115,27 @@ EXAMPLES = '''
|
|||
stacki_password: pwd
|
||||
stacki_endpoint: url
|
||||
state: absent
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
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
|
||||
type: bool
|
||||
sample: true
|
||||
|
||||
stdout:
|
||||
description: the set of responses from the commands
|
||||
description: The set of responses from the commands.
|
||||
returned: always
|
||||
type: list
|
||||
sample: ['...', '...']
|
||||
|
||||
stdout_lines:
|
||||
description: the value of stdout split into a list
|
||||
description: The value of stdout split into a list.
|
||||
returned: always
|
||||
type: list
|
||||
sample: [['...', '...'], ['...'], ['...']]
|
||||
'''
|
||||
"""
|
||||
|
||||
import json
|
||||
|
||||
|
|
|
@ -7,15 +7,14 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
DOCUMENTATION = r"""
|
||||
module: statsd
|
||||
short_description: Send metrics to StatsD
|
||||
version_added: 2.1.0
|
||||
description:
|
||||
- The C(statsd) module sends metrics to StatsD.
|
||||
- For more information, see U(https://statsd-metrics.readthedocs.io/en/latest/).
|
||||
- Supported metric types are V(counter) and V(gauge).
|
||||
Currently unupported metric types are V(timer), V(set), and V(gaugedelta).
|
||||
- Supported metric types are V(counter) and V(gauge). Currently unupported metric types are V(timer), V(set), and V(gaugedelta).
|
||||
author: "Mark Mercado (@mamercad)"
|
||||
requirements:
|
||||
- statsd
|
||||
|
@ -80,9 +79,9 @@ options:
|
|||
default: false
|
||||
description:
|
||||
- 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
|
||||
community.general.statsd:
|
||||
host: localhost
|
||||
|
@ -100,7 +99,7 @@ EXAMPLES = '''
|
|||
metric: my_gauge
|
||||
metric_type: gauge
|
||||
value: 7
|
||||
'''
|
||||
"""
|
||||
|
||||
|
||||
from ansible.module_utils.basic import (AnsibleModule, missing_required_lib)
|
||||
|
|
|
@ -9,17 +9,14 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: statusio_maintenance
|
||||
short_description: Create maintenance windows for your status.io dashboard
|
||||
description:
|
||||
- Creates a maintenance window for status.io
|
||||
- Deletes a maintenance window for status.io
|
||||
- Creates or deletes a maintenance window for status.io.
|
||||
notes:
|
||||
- You can use the apiary API url (http://docs.statusio.apiary.io/) to
|
||||
capture API traffic
|
||||
- Use start_date and start_time with minutes to set future maintenance window
|
||||
- You can use the apiary API URL (U(http://docs.statusio.apiary.io/)) to capture API traffic.
|
||||
- Use start_date and start_time with minutes to set future maintenance window.
|
||||
author: Benjamin Copeland (@bhcopeland) <ben@copeland.me.uk>
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
|
@ -32,12 +29,12 @@ options:
|
|||
title:
|
||||
type: str
|
||||
description:
|
||||
- A descriptive title for the maintenance window
|
||||
- A descriptive title for the maintenance window.
|
||||
default: "A new maintenance window"
|
||||
desc:
|
||||
type: str
|
||||
description:
|
||||
- Message describing the maintenance window
|
||||
- Message describing the maintenance window.
|
||||
default: "Created by Ansible"
|
||||
state:
|
||||
type: str
|
||||
|
@ -48,17 +45,17 @@ options:
|
|||
api_id:
|
||||
type: str
|
||||
description:
|
||||
- Your unique API ID from status.io
|
||||
- Your unique API ID from status.io.
|
||||
required: true
|
||||
api_key:
|
||||
type: str
|
||||
description:
|
||||
- Your unique API Key from status.io
|
||||
- Your unique API Key from status.io.
|
||||
required: true
|
||||
statuspage:
|
||||
type: str
|
||||
description:
|
||||
- Your unique StatusPage ID from status.io
|
||||
- Your unique StatusPage ID from status.io.
|
||||
required: true
|
||||
url:
|
||||
type: str
|
||||
|
@ -69,67 +66,66 @@ options:
|
|||
type: list
|
||||
elements: str
|
||||
description:
|
||||
- The given name of your component (server name)
|
||||
- The given name of your component (server name).
|
||||
aliases: ['component']
|
||||
containers:
|
||||
type: list
|
||||
elements: str
|
||||
description:
|
||||
- The given name of your container (data center)
|
||||
- The given name of your container (data center).
|
||||
aliases: ['container']
|
||||
all_infrastructure_affected:
|
||||
description:
|
||||
- If it affects all components and containers
|
||||
- If it affects all components and containers.
|
||||
type: bool
|
||||
default: false
|
||||
automation:
|
||||
description:
|
||||
- Automatically start and end the maintenance window
|
||||
- Automatically start and end the maintenance window.
|
||||
type: bool
|
||||
default: false
|
||||
maintenance_notify_now:
|
||||
description:
|
||||
- Notify subscribers now
|
||||
- Notify subscribers now.
|
||||
type: bool
|
||||
default: false
|
||||
maintenance_notify_72_hr:
|
||||
description:
|
||||
- Notify subscribers 72 hours before maintenance start time
|
||||
- Notify subscribers 72 hours before maintenance start time.
|
||||
type: bool
|
||||
default: false
|
||||
maintenance_notify_24_hr:
|
||||
description:
|
||||
- Notify subscribers 24 hours before maintenance start time
|
||||
- Notify subscribers 24 hours before maintenance start time.
|
||||
type: bool
|
||||
default: false
|
||||
maintenance_notify_1_hr:
|
||||
description:
|
||||
- Notify subscribers 1 hour before maintenance start time
|
||||
- Notify subscribers 1 hour before maintenance start time.
|
||||
type: bool
|
||||
default: false
|
||||
maintenance_id:
|
||||
type: str
|
||||
description:
|
||||
- The maintenance id number when deleting a maintenance window
|
||||
- The maintenance id number when deleting a maintenance window.
|
||||
minutes:
|
||||
type: int
|
||||
description:
|
||||
- The length of time in UTC that the maintenance will run
|
||||
(starting from playbook runtime)
|
||||
- The length of time in UTC that the maintenance will run (starting from playbook runtime).
|
||||
default: 10
|
||||
start_date:
|
||||
type: str
|
||||
description:
|
||||
- Date maintenance is expected to start (Month/Day/Year) (UTC)
|
||||
- End Date is worked out from start_date + minutes
|
||||
- Date maintenance is expected to start (Month/Day/Year) (UTC).
|
||||
- End Date is worked out from O(start_date) + O(minutes).
|
||||
start_time:
|
||||
type: str
|
||||
description:
|
||||
- Time maintenance is expected to start (Hour:Minutes) (UTC)
|
||||
- End Time is worked out from start_time + minutes
|
||||
'''
|
||||
- Time maintenance is expected to start (Hour:Minutes) (UTC).
|
||||
- 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
|
||||
community.general.statusio_maintenance:
|
||||
title: Router Upgrade from ansible
|
||||
|
@ -176,10 +172,9 @@ EXAMPLES = '''
|
|||
api_id: api_id
|
||||
api_key: api_key
|
||||
state: absent
|
||||
|
||||
'''
|
||||
"""
|
||||
# TODO: Add RETURN documentation.
|
||||
RETURN = ''' # '''
|
||||
RETURN = """ # """
|
||||
|
||||
import datetime
|
||||
import json
|
||||
|
|
|
@ -10,8 +10,7 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: sudoers
|
||||
short_description: Manage sudoers files
|
||||
version_added: "4.3.0"
|
||||
|
@ -98,11 +97,11 @@ options:
|
|||
- If V(required), visudo must be available to validate the sudoers rule.
|
||||
type: str
|
||||
default: detect
|
||||
choices: [ absent, detect, required ]
|
||||
choices: [absent, detect, required]
|
||||
version_added: 5.2.0
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Allow the backup user to sudo /usr/local/bin/backup
|
||||
community.general.sudoers:
|
||||
name: allow-backup
|
||||
|
@ -158,7 +157,7 @@ EXAMPLES = '''
|
|||
user: alice
|
||||
commands: /usr/bin/less
|
||||
noexec: true
|
||||
'''
|
||||
"""
|
||||
|
||||
import os
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
|
|
@ -9,12 +9,11 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: supervisorctl
|
||||
short_description: Manage the state of a program or group of programs running via supervisord
|
||||
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:
|
||||
- community.general.attributes
|
||||
attributes:
|
||||
|
@ -33,29 +32,29 @@ options:
|
|||
config:
|
||||
type: path
|
||||
description:
|
||||
- The supervisor configuration file path
|
||||
- The supervisor configuration file path.
|
||||
server_url:
|
||||
type: str
|
||||
description:
|
||||
- URL on which supervisord server is listening
|
||||
- URL on which supervisord server is listening.
|
||||
username:
|
||||
type: str
|
||||
description:
|
||||
- username to use for authentication
|
||||
- Username to use for authentication.
|
||||
password:
|
||||
type: str
|
||||
description:
|
||||
- password to use for authentication
|
||||
- Password to use for authentication.
|
||||
state:
|
||||
type: str
|
||||
description:
|
||||
- The desired state of program/group.
|
||||
required: true
|
||||
choices: [ "present", "started", "stopped", "restarted", "absent", "signalled" ]
|
||||
choices: ["present", "started", "stopped", "restarted", "absent", "signalled"]
|
||||
stop_before_removing:
|
||||
type: bool
|
||||
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
|
||||
default: false
|
||||
version_added: 7.5.0
|
||||
|
@ -66,19 +65,19 @@ options:
|
|||
supervisorctl_path:
|
||||
type: path
|
||||
description:
|
||||
- path to supervisorctl executable
|
||||
- Path to C(supervisorctl) executable.
|
||||
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=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.
|
||||
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).
|
||||
requirements: [ "supervisorctl" ]
|
||||
- When O(state=absent), the module will call C(supervisorctl reread) then C(supervisorctl remove) to remove the target program/group. 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).
|
||||
requirements: ["supervisorctl"]
|
||||
author:
|
||||
- "Matt Wright (@mattupstate)"
|
||||
- "Aaron Wang (@inetfuture) <inetfuture@gmail.com>"
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Manage the state of program to be in started state
|
||||
community.general.supervisorctl:
|
||||
name: my_app
|
||||
|
@ -113,7 +112,7 @@ EXAMPLES = '''
|
|||
community.general.supervisorctl:
|
||||
name: all
|
||||
state: restarted
|
||||
'''
|
||||
"""
|
||||
|
||||
import os
|
||||
from ansible.module_utils.basic import AnsibleModule, is_executable
|
||||
|
|
|
@ -8,11 +8,10 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: svc
|
||||
author:
|
||||
- Brian Coca (@bcoca)
|
||||
- Brian Coca (@bcoca)
|
||||
short_description: Manage daemontools services
|
||||
description:
|
||||
- Controls daemontools services on remote hosts using the svc utility.
|
||||
|
@ -31,37 +30,33 @@ options:
|
|||
required: true
|
||||
state:
|
||||
description:
|
||||
- V(started)/V(stopped) are idempotent actions that will not run
|
||||
commands unless necessary. V(restarted) will always bounce the
|
||||
svc (svc -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 once (svc -o), not really
|
||||
an idempotent operation.
|
||||
- V(started)/V(stopped) are idempotent actions that will not run commands unless necessary. V(restarted) will always bounce the svc (svc
|
||||
-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
|
||||
once (svc -o), not really an idempotent operation.
|
||||
type: str
|
||||
choices: [ killed, once, reloaded, restarted, started, stopped ]
|
||||
choices: [killed, once, reloaded, restarted, started, stopped]
|
||||
downed:
|
||||
description:
|
||||
- Should a 'down' file exist or not, if it exists it disables auto startup.
|
||||
Defaults to no. Downed does not imply stopped.
|
||||
- Should a 'down' file exist or not, if it exists it disables auto startup. Defaults to no. Downed does not imply stopped.
|
||||
type: bool
|
||||
enabled:
|
||||
description:
|
||||
- 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 restart).
|
||||
- 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
|
||||
restart).
|
||||
type: bool
|
||||
service_dir:
|
||||
description:
|
||||
- Directory svscan watches for services
|
||||
- Directory svscan watches for services.
|
||||
type: str
|
||||
default: /service
|
||||
service_src:
|
||||
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
|
||||
default: /etc/service
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Start svc dnscache, if not running
|
||||
community.general.svc:
|
||||
name: dnscache
|
||||
|
@ -92,7 +87,7 @@ EXAMPLES = '''
|
|||
name: dnscache
|
||||
state: reloaded
|
||||
service_dir: /var/service
|
||||
'''
|
||||
"""
|
||||
|
||||
import os
|
||||
import re
|
||||
|
|
|
@ -10,16 +10,13 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: svr4pkg
|
||||
short_description: Manage Solaris SVR4 packages
|
||||
description:
|
||||
- Manages SVR4 packages on Solaris 10 and 11.
|
||||
- These were the native packages on Solaris <= 10 and are available
|
||||
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.
|
||||
- These were the native packages on Solaris <= 10 and are available 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.
|
||||
author: "Boyd Adamson (@brontitall)"
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
|
@ -47,8 +44,9 @@ options:
|
|||
src:
|
||||
description:
|
||||
- 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)."
|
||||
- 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.
|
||||
- "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.
|
||||
type: str
|
||||
proxy:
|
||||
description:
|
||||
|
@ -73,9 +71,9 @@ options:
|
|||
required: false
|
||||
type: bool
|
||||
default: false
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Install a package from an already copied file
|
||||
community.general.svr4pkg:
|
||||
name: CSWcommon
|
||||
|
@ -106,7 +104,7 @@ EXAMPLES = '''
|
|||
name: FIREFOX
|
||||
state: absent
|
||||
category: true
|
||||
'''
|
||||
"""
|
||||
|
||||
|
||||
import os
|
||||
|
|
|
@ -12,12 +12,11 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: swdepot
|
||||
short_description: Manage packages with swdepot package manager (HP-UX)
|
||||
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: []
|
||||
author: "Raul Melo (@melodous)"
|
||||
extends_documentation_fragment:
|
||||
|
@ -30,23 +29,23 @@ attributes:
|
|||
options:
|
||||
name:
|
||||
description:
|
||||
- package name.
|
||||
- Package name.
|
||||
aliases: [pkg]
|
||||
required: true
|
||||
type: str
|
||||
state:
|
||||
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
|
||||
choices: [ 'present', 'latest', 'absent']
|
||||
choices: ['present', 'latest', 'absent']
|
||||
type: str
|
||||
depot:
|
||||
description:
|
||||
- The source repository from which install or upgrade a package.
|
||||
type: str
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Install a package
|
||||
community.general.swdepot:
|
||||
name: unzip-6.0
|
||||
|
@ -63,7 +62,7 @@ EXAMPLES = '''
|
|||
community.general.swdepot:
|
||||
name: unzip
|
||||
state: absent
|
||||
'''
|
||||
"""
|
||||
|
||||
import re
|
||||
|
||||
|
|
|
@ -10,13 +10,11 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: swupd
|
||||
short_description: Manages updates and bundles in ClearLinux systems
|
||||
description:
|
||||
- Manages updates and bundles with the swupd bundle manager, which is used by the
|
||||
Clear Linux Project for Intel Architecture.
|
||||
- Manages updates and bundles with the swupd bundle manager, which is used by the Clear Linux Project for Intel Architecture.
|
||||
author: Alberto Murillo (@albertomurillo)
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
|
@ -28,19 +26,16 @@ attributes:
|
|||
options:
|
||||
contenturl:
|
||||
description:
|
||||
- URL pointing to the contents of available bundles.
|
||||
If not specified, the contents are retrieved from clearlinux.org.
|
||||
- URL pointing to the contents of available bundles. If not specified, the contents are retrieved from clearlinux.org.
|
||||
type: str
|
||||
format:
|
||||
description:
|
||||
- The format suffix for version file downloads. For example [1,2,3,staging,etc].
|
||||
If not specified, the default format is used.
|
||||
- The format suffix for version file downloads. For example [1,2,3,staging,etc]. If not specified, the default format is used.
|
||||
type: str
|
||||
manifest:
|
||||
description:
|
||||
- The manifest contains information about the bundles at certain version of the OS.
|
||||
Specify a Manifest version to verify against that version or leave unspecified to
|
||||
verify against the current version.
|
||||
- The manifest contains information about the bundles at certain version of the OS. Specify a Manifest version to verify against that version
|
||||
or leave unspecified to verify against the current version.
|
||||
aliases: [release, version]
|
||||
type: int
|
||||
name:
|
||||
|
@ -50,8 +45,7 @@ options:
|
|||
type: str
|
||||
state:
|
||||
description:
|
||||
- Indicates the desired (I)bundle state. V(present) ensures the bundle
|
||||
is installed while V(absent) ensures the (I)bundle is not installed.
|
||||
- Indicates the desired (I)bundle state. V(present) ensures the bundle is installed while V(absent) ensures the (I)bundle is not installed.
|
||||
default: present
|
||||
choices: [present, absent]
|
||||
type: str
|
||||
|
@ -73,9 +67,9 @@ options:
|
|||
description:
|
||||
- URL for version string download.
|
||||
type: str
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Update the OS to the latest version
|
||||
community.general.swupd:
|
||||
update: true
|
||||
|
@ -98,18 +92,18 @@ EXAMPLES = '''
|
|||
community.general.swupd:
|
||||
verify: true
|
||||
manifest: 12920
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
stdout:
|
||||
description: stdout of swupd
|
||||
description: C(stdout) of C(swupd).
|
||||
returned: always
|
||||
type: str
|
||||
stderr:
|
||||
description: stderr of swupd
|
||||
description: C(stderr) of C(swupd).
|
||||
returned: always
|
||||
type: str
|
||||
'''
|
||||
"""
|
||||
|
||||
import os
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
|
|
@ -7,8 +7,7 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: syslogger
|
||||
short_description: Log messages in the syslog
|
||||
description:
|
||||
|
@ -30,15 +29,14 @@ options:
|
|||
type: str
|
||||
description:
|
||||
- Set the log priority.
|
||||
choices: [ "emerg", "alert", "crit", "err", "warning", "notice", "info", "debug" ]
|
||||
choices: ["emerg", "alert", "crit", "err", "warning", "notice", "info", "debug"]
|
||||
default: "info"
|
||||
facility:
|
||||
type: str
|
||||
description:
|
||||
- Set the log facility.
|
||||
choices: [ "kern", "user", "mail", "daemon", "auth", "lpr", "news",
|
||||
"uucp", "cron", "syslog", "local0", "local1", "local2",
|
||||
"local3", "local4", "local5", "local6", "local7" ]
|
||||
choices: ["kern", "user", "mail", "daemon", "auth", "lpr", "news", "uucp", "cron", "syslog", "local0", "local1", "local2", "local3", "local4",
|
||||
"local5", "local6", "local7"]
|
||||
default: "daemon"
|
||||
log_pid:
|
||||
description:
|
||||
|
@ -53,9 +51,9 @@ options:
|
|||
version_added: '0.2.0'
|
||||
author:
|
||||
- Tim Rightnour (@garbled1)
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = r'''
|
||||
EXAMPLES = r"""
|
||||
- name: Simple Usage
|
||||
community.general.syslogger:
|
||||
msg: "I will end up as daemon.info"
|
||||
|
@ -72,36 +70,36 @@ EXAMPLES = r'''
|
|||
ident: "MyApp"
|
||||
msg: "I want to believe"
|
||||
priority: "alert"
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = r'''
|
||||
RETURN = r"""
|
||||
ident:
|
||||
description: Name of application sending the message to log
|
||||
description: Name of application sending the message to log.
|
||||
returned: always
|
||||
type: str
|
||||
sample: "ansible_syslogger"
|
||||
version_added: '0.2.0'
|
||||
priority:
|
||||
description: Priority level
|
||||
description: Priority level.
|
||||
returned: always
|
||||
type: str
|
||||
sample: "daemon"
|
||||
facility:
|
||||
description: Syslog facility
|
||||
description: Syslog facility.
|
||||
returned: always
|
||||
type: str
|
||||
sample: "info"
|
||||
log_pid:
|
||||
description: Log PID status
|
||||
description: Log PID status.
|
||||
returned: always
|
||||
type: bool
|
||||
sample: true
|
||||
msg:
|
||||
description: Message sent to syslog
|
||||
description: Message sent to syslog.
|
||||
returned: always
|
||||
type: str
|
||||
sample: "Hello from Ansible"
|
||||
'''
|
||||
"""
|
||||
|
||||
import syslog
|
||||
import traceback
|
||||
|
|
|
@ -8,16 +8,14 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: syspatch
|
||||
|
||||
short_description: Manage OpenBSD system patches
|
||||
|
||||
|
||||
description:
|
||||
- "Manage OpenBSD system patches using syspatch."
|
||||
|
||||
- Manage OpenBSD system patches using syspatch.
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
|
||||
|
@ -32,13 +30,13 @@ options:
|
|||
description:
|
||||
- Revert system patches.
|
||||
type: str
|
||||
choices: [ all, one ]
|
||||
choices: [all, one]
|
||||
|
||||
author:
|
||||
- Andrew Klaus (@precurse)
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Apply all available system patches
|
||||
community.general.syspatch:
|
||||
|
||||
|
@ -58,20 +56,20 @@ EXAMPLES = '''
|
|||
- name: Reboot if patch requires it
|
||||
ansible.builtin.reboot:
|
||||
when: syspatch.reboot_needed
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = r'''
|
||||
RETURN = r"""
|
||||
rc:
|
||||
description: The command return code (0 means success)
|
||||
description: The command return code (0 means success).
|
||||
returned: always
|
||||
type: int
|
||||
stdout:
|
||||
description: syspatch standard output.
|
||||
description: C(syspatch) standard output.
|
||||
returned: always
|
||||
type: str
|
||||
sample: "001_rip6cksum"
|
||||
stderr:
|
||||
description: syspatch standard error.
|
||||
description: C(syspatch) standard error.
|
||||
returned: always
|
||||
type: str
|
||||
sample: "syspatch: need root privileges"
|
||||
|
@ -80,7 +78,7 @@ reboot_needed:
|
|||
returned: always
|
||||
type: bool
|
||||
sample: true
|
||||
'''
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
|
|
|
@ -9,8 +9,7 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
author:
|
||||
- David Lundgren (@dlundgren)
|
||||
module: sysrc
|
||||
|
@ -45,7 +44,7 @@ options:
|
|||
- Use V(value_absent) to remove the value from the existing variable.
|
||||
type: str
|
||||
default: "present"
|
||||
choices: [ absent, present, value_present, value_absent ]
|
||||
choices: [absent, present, value_present, value_absent]
|
||||
path:
|
||||
description:
|
||||
- Path to file to use instead of V(/etc/rc.conf).
|
||||
|
@ -63,10 +62,9 @@ options:
|
|||
type: str
|
||||
notes:
|
||||
- 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
|
||||
- name: Configure mysql pid file
|
||||
community.general.sysrc:
|
||||
|
@ -94,15 +92,15 @@ EXAMPLES = r'''
|
|||
name: nginx_enable
|
||||
value: "YES"
|
||||
jail: testjail
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = r'''
|
||||
RETURN = r"""
|
||||
changed:
|
||||
description: Return changed for sysrc actions.
|
||||
returned: always
|
||||
type: bool
|
||||
sample: true
|
||||
'''
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
import re
|
||||
|
|
|
@ -8,13 +8,12 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: sysupgrade
|
||||
short_description: Manage OpenBSD system upgrades
|
||||
version_added: 1.1.0
|
||||
description:
|
||||
- Manage OpenBSD system upgrades using sysupgrade.
|
||||
- Manage OpenBSD system upgrades using C(sysupgrade).
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
attributes:
|
||||
|
@ -36,26 +35,26 @@ options:
|
|||
type: bool
|
||||
keep_files:
|
||||
description:
|
||||
- Keep the files under /home/_sysupgrade.
|
||||
- Keep the files under C(/home/_sysupgrade).
|
||||
- By default, the files will be deleted after the upgrade.
|
||||
default: false
|
||||
type: bool
|
||||
fetch_only:
|
||||
description:
|
||||
- Fetch and verify files and create /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.
|
||||
- Fetch and verify files and create C(/bsd.upgrade) but do not reboot.
|
||||
- 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
|
||||
type: bool
|
||||
installurl:
|
||||
description:
|
||||
- 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
|
||||
author:
|
||||
- Andrew Klaus (@precurse)
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = r'''
|
||||
EXAMPLES = r"""
|
||||
- name: Upgrade to latest release
|
||||
community.general.sysupgrade:
|
||||
register: sysupgrade
|
||||
|
@ -77,9 +76,9 @@ EXAMPLES = r'''
|
|||
community.general.sysupgrade:
|
||||
fetch_only: false
|
||||
ignore_errors: true
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = r'''
|
||||
RETURN = r"""
|
||||
rc:
|
||||
description: The command return code (0 means success).
|
||||
returned: always
|
||||
|
@ -93,7 +92,7 @@ stderr:
|
|||
returned: always
|
||||
type: str
|
||||
sample: "sysupgrade: need root privileges"
|
||||
'''
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
|
|
Loading…
Reference in New Issue