doc_fragments: Clean up parameter types (cloud) (#52177)

* module_utils: Clean up parameter types (cloud)

This PR includes:

- Parameter types added
- Copyright format fixes
- Short license statement
- Description fixes (only for a few files, then I stopped :-))

* More cloud stuff

* Fix reported issue

* Fix quotes

* Use correct type

* Fix quotes

* Fix quotes

* Fix quotes

* Fix typo

* Fix boolean
This commit is contained in:
Dag Wieers 2019-02-15 13:21:20 +01:00 committed by John R Barker
parent 203caf2570
commit 25323155d2
28 changed files with 337 additions and 412 deletions

View file

@ -1,54 +1,48 @@
# !/usr/bin/python
# Copyright (c) 2017 Alibaba Group Holding Limited. He Guimin <heguimin36@163.com>
# -*- coding: utf-8 -*-
# Copyright: (c) 2017 Alibaba Group Holding Limited. He Guimin <heguimin36@163.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
class ModuleDocFragment(object):
# Alicloud only documentation fragment
DOCUMENTATION = """
DOCUMENTATION = r'''
options:
alicloud_access_key:
description:
- Aliyun Cloud access key. If not set then the value of environment variable C(ALICLOUD_ACCESS_KEY),
C(ALICLOUD_ACCESS_KEY_ID) will be used instead.
aliases: ['access_key_id', 'access_key']
- Aliyun Cloud access key.
- If not set then the value of environment variable C(ALICLOUD_ACCESS_KEY),
C(ALICLOUD_ACCESS_KEY_ID) will be used instead.
type: str
aliases: [ access_key_id, access_key ]
alicloud_secret_key:
description:
- Aliyun Cloud secret key. If not set then the value of environment variable C(ALICLOUD_SECRET_KEY),
C(ALICLOUD_SECRET_ACCESS_KEY) will be used instead.
aliases: ['secret_access_key', 'secret_key']
- Aliyun Cloud secret key.
- If not set then the value of environment variable C(ALICLOUD_SECRET_KEY),
C(ALICLOUD_SECRET_ACCESS_KEY) will be used instead.
type: str
aliases: [ secret_access_key, secret_key ]
alicloud_region:
description:
- The Aliyun Cloud region to use. If not specified then the value of environment variable
C(ALICLOUD_REGION), C(ALICLOUD_REGION_ID) will be used instead.
aliases: ['region', 'region_id']
- The Aliyun Cloud region to use.
- If not specified then the value of environment variable
C(ALICLOUD_REGION), C(ALICLOUD_REGION_ID) will be used instead.
type: str
aliases: [ region, region_id ]
alicloud_security_token:
description:
- The Aliyun Cloud security token. If not specified then the value of environment variable
C(ALICLOUD_SECURITY_TOKEN) will be used instead.
aliases: ['security_token']
- The Aliyun Cloud security token.
- If not specified then the value of environment variable
C(ALICLOUD_SECURITY_TOKEN) will be used instead.
type: str
aliases: [ security_token ]
author:
- "He Guimin (@xiaozhu36)"
- He Guimin (@xiaozhu36)
requirements:
- "python >= 2.6"
- python >= 2.6
extends_documentation_fragment:
- alicloud
- alicloud
notes:
- If parameters are not set within the module, the following
environment variables can be used in decreasing order of precedence
@ -58,4 +52,4 @@ notes:
C(ALICLOUD_SECURITY_TOKEN)
- C(ALICLOUD_REGION) or C(ALICLOUD_REGION_ID) can be typically be used to specify the
ALICLOUD region, when required, but this can also be configured in the footmark config file
"""
'''

View file

@ -1,56 +1,49 @@
# (c) 2014, Will Thames <will@thames.id.au>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# -*- coding: utf-8 -*-
# Copyright: (c) 2014, Will Thames <will@thames.id.au>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# AWS only documentation fragment
DOCUMENTATION = """
DOCUMENTATION = r'''
options:
ec2_url:
description:
- Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints).
Ignored for modules where region is required. Must be specified for all other modules if region is not used.
If not set then the value of the EC2_URL environment variable, if any, is used.
type: str
aws_secret_key:
description:
- AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
aliases: [ 'ec2_secret_key', 'secret_key' ]
type: str
aliases: [ ec2_secret_key, secret_key ]
aws_access_key:
description:
- AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
aliases: [ 'ec2_access_key', 'access_key' ]
type: str
aliases: [ ec2_access_key, access_key ]
security_token:
description:
- AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
aliases: [ 'access_token' ]
type: str
aliases: [ access_token ]
version_added: "1.6"
validate_certs:
description:
- When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
type: bool
default: 'yes'
default: yes
version_added: "1.5"
profile:
description:
- Uses a boto profile. Only works with boto >= 2.24.0.
type: str
version_added: "1.6"
requirements:
- "python >= 2.6"
- python >= 2.6
- boto
notes:
- If parameters are not set within the module, the following
@ -64,4 +57,4 @@ notes:
credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html
- C(AWS_REGION) or C(EC2_REGION) can be typically be used to specify the
AWS region, when required, but this can also be configured in the boto config file
"""
'''

View file

@ -1,39 +1,46 @@
# (c) 2017 Ansible Project
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# inventory cache
DOCUMENTATION = """
DOCUMENTATION = r'''
options:
aws_profile:
description: The AWS profile
aliases: ['boto_profile']
type: str
aliases: [ boto_profile ]
env:
- name: AWS_PROFILE
- name: AWS_DEFAULT_PROFILE
aws_access_key:
description: The AWS access key to use.
type: str
env:
- name: AWS_ACCESS_KEY_ID
- name: AWS_ACCESS_KEY
- name: EC2_ACCESS_KEY
aws_secret_key:
description: The AWS secret key that corresponds to the access key.
type: str
env:
- name: AWS_SECRET_ACCESS_KEY
- name: AWS_SECRET_KEY
- name: EC2_SECRET_KEY
aws_security_token:
description: The AWS security token if using temporary access and secret keys.
type: str
env:
- name: AWS_SECURITY_TOKEN
- name: AWS_SESSION_TOKEN
- name: EC2_SECURITY_TOKEN
region:
description: The region for which to create the connection.
type: str
env:
- name: AWS_REGION
- name: EC2_REGION
"""
'''

View file

@ -1,33 +1,21 @@
# Copyright (c) 2016 Matt Davis, <mdavis@ansible.com>
# Chris Houseknecht, <house@redhat.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
#
# -*- coding: utf-8 -*-
# Copyright: (c) 2016 Matt Davis, <mdavis@ansible.com>
# Copyright: (c) 2016 Chris Houseknecht, <house@redhat.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# Azure doc fragment
DOCUMENTATION = '''
DOCUMENTATION = r'''
options:
ad_user:
description:
- Active Directory username. Use when authenticating with an Active Directory user rather than service
principal.
type: str
password:
description:
- Active Directory user password. Use when authenticating with an Active Directory user rather than service
@ -35,38 +23,44 @@ options:
profile:
description:
- Security profile found in ~/.azure/credentials file.
type: str
subscription_id:
description:
- Your Azure subscription Id.
type: str
client_id:
description:
- Azure client ID. Use when authenticating with a Service Principal.
type: str
secret:
description:
- Azure client secret. Use when authenticating with a Service Principal.
type: str
tenant:
description:
- Azure tenant ID. Use when authenticating with a Service Principal.
type: str
cloud_environment:
description:
- For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, C(AzureChinaCloud),
C(AzureUSGovernment)), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or
the C(AZURE_CLOUD_ENVIRONMENT) environment variable.
type: str
default: AzureCloud
version_added: 2.4
version_added: '2.4'
adfs_authority_url:
description:
- Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority.
required: false
default: null
version_added: 2.6
type: str
version_added: '2.6'
cert_validation_mode:
description:
- Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but
when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing C(ignore). Can also be
set via credential file profile or the C(AZURE_CERT_VALIDATION) environment variable.
choices: [validate, ignore]
version_added: 2.5
type: str
choices: [ ignore, validate ]
version_added: '2.5'
auth_source:
description:
- Controls the source of the credentials to use for authentication.
@ -79,22 +73,24 @@ options:
environment variable C(AZURE_SUBSCRIPTION_ID) can be used to identify the subscription ID if the resource is granted
access to more than one subscription, otherwise the first subscription is chosen.
- The C(msi) was added in Ansible 2.6.
type: str
choices:
- auto
- cli
- credential_file
- env
- msi
version_added: 2.5
version_added: '2.5'
api_profile:
description:
- Selects an API profile to use when communicating with Azure services. Default value of C(latest) is appropriate for public clouds;
future values will allow use with Azure Stack.
type: str
default: latest
version_added: 2.5
version_added: '2.5'
requirements:
- "python >= 2.7"
- "azure >= 2.0.0"
- python >= 2.7
- azure >= 2.0.0
notes:
- For authentication with Azure you can pass parameters, set environment variables or use a profile stored

View file

@ -1,37 +1,25 @@
# Copyright (c) 2016 Matt Davis, <mdavis@ansible.com>
# Chris Houseknecht, <house@redhat.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
#
# -*- coding: utf-8 -*-
# Copyright: (c) 2016, Matt Davis, <mdavis@ansible.com>
# Copyright: (c) 2016, Chris Houseknecht, <house@redhat.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# Azure doc fragment
DOCUMENTATION = '''
DOCUMENTATION = r'''
options:
tags:
description:
- >
Dictionary of string:string pairs to assign as metadata to the object.
Metadata tags on the object will be updated with any provided values. To remove tags set append_tags option to false.
- Dictionary of string:string pairs to assign as metadata to the object.
- Metadata tags on the object will be updated with any provided values.
- To remove tags set append_tags option to false.
type: str
append_tags:
description:
- Use to control if tags field is canonical or just appends to existing tags.
When canonical, any tags not found in the tags parameter will be removed from the object's metadata.
- When canonical, any tags not found in the tags parameter will be removed from the object's metadata.
type: bool
default: 'yes'
default: yes
'''

View file

@ -1,25 +1,12 @@
#
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# -*- coding: utf-8 -*-
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# Standard files documentation fragment
DOCUMENTATION = """
DOCUMENTATION = r'''
options:
provider:
description:
@ -30,6 +17,7 @@ options:
- Specifies the DNS host name or address for connecting to the remote
device over the specified transport. The value of host is used as
the destination address for the transport.
type: str
required: true
port:
description:
@ -37,6 +25,7 @@ options:
device. This value applies to either I(cli) or I(netconf). The port
value will default to the appropriate transport common port if
none is provided in the task. (cli=22, netconf=22).
type: int
default: 0 (use common port)
username:
description:
@ -44,25 +33,28 @@ options:
the remote device. This value is used to authenticate the CLI login.
If the value is not specified in the task, the value of environment
variable C(ANSIBLE_NET_USERNAME) will be used instead.
type: str
password:
description:
- Specifies the password to use to authenticate the connection to
the remote device. This is a common argument used for cli
transports. If the value is not specified in the task, the
value of environment variable C(ANSIBLE_NET_PASSWORD) will be used instead.
type: str
ssh_keyfile:
description:
- Specifies the SSH key to use to authenticate the connection to
the remote device. This argument is used for the I(cli)
transport. If the value is not specified in the task, the
value of environment variable C(ANSIBLE_NET_SSH_KEYFILE) will be used instead.
type: path
transport:
description:
- Configures the transport connection to use when connecting to the
remote device. The transport argument supports connectivity to the
device over cli (ssh).
type: str
required: true
choices: [ cli, netconf ]
default: cli
"""
'''

View file

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2015, René Moser <mail@renemoser.net>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
@ -6,29 +7,33 @@
class ModuleDocFragment(object):
# Standard cloudstack documentation fragment
DOCUMENTATION = '''
DOCUMENTATION = r'''
options:
api_key:
description:
- API key of the CloudStack API.
- If not given, the C(CLOUDSTACK_KEY) env variable is considered.
- As the last option, the value is taken from the ini config file, also see the notes.
type: str
api_secret:
description:
- Secret key of the CloudStack API.
- If not set, the C(CLOUDSTACK_SECRET) env variable is considered.
- As the last option, the value is taken from the ini config file, also see the notes.
type: str
api_url:
description:
- URL of the CloudStack API e.g. https://cloud.example.com/client/api.
- If not given, the C(CLOUDSTACK_ENDPOINT) env variable is considered.
- As the last option, the value is taken from the ini config file, also see the notes.
type: str
api_http_method:
description:
- HTTP method used to query the API endpoint.
- If not given, the C(CLOUDSTACK_METHOD) env variable is considered.
- As the last option, the value is taken from the ini config file, also see the notes.
- Fallback value is C(get) if not specified.
type: str
choices: [ get, post ]
api_timeout:
description:
@ -36,14 +41,16 @@ options:
- If not given, the C(CLOUDSTACK_TIMEOUT) env variable is considered.
- As the last option, the value is taken from the ini config file, also see the notes.
- Fallback value is 10 seconds if not specified.
type: int
api_region:
description:
- Name of the ini section in the C(cloustack.ini) file.
- If not given, the C(CLOUDSTACK_REGION) env variable is considered.
type: str
default: cloudstack
requirements:
- "python >= 2.6"
- "cs >= 0.6.10"
- python >= 2.6
- cs >= 0.6.10
notes:
- Ansible uses the C(cs) library's configuration method if credentials are not
provided by the arguments C(api_url), C(api_key), C(api_secret).

View file

@ -1,28 +1,30 @@
# Copyright (c) 2018, Ansible Project
# Copyright (c) 2018, Abhijeet Kasurde (akasurde@redhat.com)
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Ansible Project
# Copyright: (c) 2018, Abhijeet Kasurde (akasurde@redhat.com)
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# Parameters for DigitalOcean modules
DOCUMENTATION = '''
DOCUMENTATION = r'''
options:
oauth_token:
description:
- DigitalOcean OAuth token.
- "There are several other environment variables which can be used to provide this value."
- "i.e., - 'DO_API_TOKEN', 'DO_API_KEY', 'DO_OAUTH_TOKEN' and 'OAUTH_TOKEN'"
required: false
aliases: ['api_token']
type: str
aliases: [ api_token ]
timeout:
description:
- The timeout in seconds used for polling DigitalOcean's API.
type: int
default: 30
validate_certs:
description:
- If set to C(no), the SSL certificates will not be validated.
- This should only set to C(no) used on personally controlled sites using self-signed certificates.
default: true
type: bool
default: yes
'''

View file

@ -1,20 +1,8 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016 Dimension Data
#
# This module is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This software is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this software. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright: (c) 2016, Dimension Data
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Authors:
# - Adam Friedman <tintoy@tintoy.io>
@ -22,7 +10,7 @@
class ModuleDocFragment(object):
# Dimension Data doc fragment
DOCUMENTATION = '''
DOCUMENTATION = r'''
options:
region:
@ -33,27 +21,28 @@ options:
- They are also listed in U(https://libcloud.readthedocs.io/en/latest/compute/drivers/dimensiondata.html)
- Note that the default value "na" stands for "North America".
- The module prepends 'dd-' to the region choice.
type: str
default: na
mcp_user:
description:
- The username used to authenticate to the CloudControl API.
- If not specified, will fall back to C(MCP_USER) from environment variable or C(~/.dimensiondata).
required: false
type: str
mcp_password:
description:
- The password used to authenticate to the CloudControl API.
- If not specified, will fall back to C(MCP_PASSWORD) from environment variable or C(~/.dimensiondata).
- Required if I(mcp_user) is specified.
required: false
type: str
location:
description:
- The target datacenter.
type: str
required: true
validate_certs:
description:
- If C(false), SSL certificates will not be validated.
- This should only be used on private instances of the CloudControl API that use self-signed certificates.
required: false
default: true
type: bool
'''
default: yes
'''

View file

@ -1,20 +1,8 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016 Dimension Data
#
# This module is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This software is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this software. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright: (c) 2016, Dimension Data
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Authors:
# - Adam Friedman <tintoy@tintoy.io>
@ -22,25 +10,24 @@
class ModuleDocFragment(object):
# Dimension Data ("wait-for-completion" parameters) doc fragment
DOCUMENTATION = '''
DOCUMENTATION = r'''
options:
wait:
description:
- Should we wait for the task to complete before moving onto the next.
required: false
default: false
type: bool
default: no
wait_time:
description:
- The maximum amount of time (in seconds) to wait for the task to complete.
- Only applicable if I(wait=true).
required: false
type: int
default: 600
wait_poll_interval:
description:
- The amount of time (in seconds) to wait between checks for task completion.
- Only applicable if I(wait=true).
required: false
type: int
default: 2
'''

View file

@ -47,21 +47,21 @@ options:
- Use a CA certificate when performing server verification by providing the path to a CA certificate file.
- If the value is not specified in the task and the environment variable C(DOCKER_CERT_PATH) is set,
the file C(ca.pem) from the directory specified in the environment variable C(DOCKER_CERT_PATH) will be used.
type: str
type: path
aliases: [ tls_ca_cert ]
cert_path:
description:
- Path to the client's TLS certificate file.
- If the value is not specified in the task and the environment variable C(DOCKER_CERT_PATH) is set,
the file C(cert.pem) from the directory specified in the environment variable C(DOCKER_CERT_PATH) will be used.
type: str
type: path
aliases: [ tls_client_cert ]
key_path:
description:
- Path to the client's TLS key file.
- If the value is not specified in the task and the environment variable C(DOCKER_CERT_PATH) is set,
the file C(key.pem) from the directory specified in the environment variable C(DOCKER_CERT_PATH) will be used.
type: str
type: path
aliases: [ tls_client_key ]
ssl_version:
description:
@ -76,19 +76,19 @@ options:
- If the value is not specified in the task, the value of environment variable C(DOCKER_TLS) will be used
instead. If the environment variable is not set, the default value will be used.
type: bool
default: false
default: no
tls_verify:
description:
- Secure the connection to the API by using TLS and verifying the authenticity of the Docker host server.
- If the value is not specified in the task, the value of environment variable C(DOCKER_TLS_VERIFY) will be
used instead. If the environment variable is not set, the default value will be used.
type: bool
default: false
default: no
debug:
description:
- Debug mode
type: bool
default: false
default: no
notes:
- Connect to the Docker daemon by providing parameters with each task or by defining environment variables.

View file

@ -1,30 +1,18 @@
# (c) 2015, Ansible, Inc
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# -*- coding: utf-8 -*-
# Copyright: (c) 2015, Ansible, Inc
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# EC2 only documentation fragment
DOCUMENTATION = """
DOCUMENTATION = r'''
options:
region:
description:
- The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used.
See U(http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region)
required: false
aliases: [ 'aws_region', 'ec2_region' ]
"""
type: str
aliases: [ aws_region, ec2_region ]
'''

View file

@ -1,38 +1,43 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017 René Moser <mail@renemoser.net>
# Copyright: (c) 2017, René Moser <mail@renemoser.net>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# Standard exoscale documentation fragment
DOCUMENTATION = '''
DOCUMENTATION = r'''
options:
api_key:
description:
- API key of the Exoscale DNS API.
- Since 2.4, the ENV variable C(CLOUDSTACK_KEY) is used as default, when defined.
type: str
api_secret:
description:
- Secret key of the Exoscale DNS API.
- Since 2.4, the ENV variable C(CLOUDSTACK_SECRET) is used as default, when defined.
type: str
api_timeout:
description:
- HTTP timeout to Exoscale DNS API.
- Since 2.4, the ENV variable C(CLOUDSTACK_TIMEOUT) is used as default, when defined.
type: int
default: 10
api_region:
description:
- Name of the ini section in the C(cloustack.ini) file.
- Since 2.4, the ENV variable C(CLOUDSTACK_REGION) is used as default, when defined.
type: str
default: cloudstack
validate_certs:
description:
- Validate SSL certs of the Exoscale DNS API.
default: true
type: bool
default: yes
requirements:
- "python >= 2.6"
- python >= 2.6
notes:
- As Exoscale DNS uses the same API key and secret for all services, we reuse the config used for Exscale Compute based on CloudStack.
The config is read from several locations, in the following order.

View file

@ -1,30 +1,36 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Google Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# GCP doc fragment.
DOCUMENTATION = '''
DOCUMENTATION = r'''
options:
project:
description:
- The Google Cloud Platform project to use.
default: null
type: str
auth_kind:
description:
- The type of credential used.
type: str
required: true
choices: ["machineaccount", "serviceaccount", "application"]
choices: [ application, machineaccount, serviceaccount ]
service_account_file:
description:
- The path of a Service Account JSON file if serviceaccount is selected as type.
type: path
service_account_email:
description:
- An optional service account email address if machineaccount is selected
and the user does not wish to use the default email.
type: str
scopes:
description:
- Array of scopes to be used.
description:
- Array of scopes to be used.
type: list
notes:
- For authentication, you can set service_account_file using the
C(GCP_SERVICE_ACCOUNT_FILE) env variable.

View file

@ -1,30 +1,29 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2018, KubeVirt Team <@kubevirt>
# Copyright: (c) 2018, KubeVirt Team <@kubevirt>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# Standard oVirt documentation fragment
DOCUMENTATION = '''
DOCUMENTATION = r'''
options:
wait:
description:
- "I(True) if the module should wait for the resource to get into desired state."
default: true
type: bool
default: yes
force:
description:
- If set to C(True), and I(state) is C(present), an existing object will be replaced.
default: false
- If set to C(no), and I(state) is C(present), an existing object will be replaced.
type: bool
default: no
wait_timeout:
description:
- "The amount of time in seconds the module should wait for the resource to get into desired state."
default: 120
- The amount of time in seconds the module should wait for the resource to get into desired state.
type: int
default: 120
api_version:
description:
- "Specify the API version to be used."
@ -35,8 +34,8 @@ options:
- version
memory:
description:
- "The amount of memory to be requested by virtual machine."
- "For example 1024Mi."
- The amount of memory to be requested by virtual machine.
- For example 1024Mi.
type: str
machine_type:
description:
@ -54,11 +53,8 @@ options:
- If openshift >= 0.6.2, this defaults to C(['strategic-merge', 'merge']), which is ideal for using the same parameters
on resource kinds that combine Custom Resources and built-in resources. For openshift < 0.6.2, the default
is simply C(strategic-merge).
choices:
- json
- merge
- strategic-merge
type: list
choices: [ json, merge, strategic-merge ]
requirements:
- python >= 2.7

View file

@ -1,14 +1,13 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2018, KubeVirt Team <@kubevirt>
# Copyright: (c) 2018, KubeVirt Team <@kubevirt>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# Standard oVirt documentation fragment
DOCUMENTATION = '''
DOCUMENTATION = r'''
options:
disks:
description:

View file

@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-
# This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by
@ -31,7 +33,7 @@
class ModuleDocFragment(object):
# Standard Pylxca documentation fragment
DOCUMENTATION = '''
DOCUMENTATION = r'''
author:
- Naval Patel (@navalkp)
- Prashant Bhosale (@prabhosa)
@ -39,18 +41,20 @@ author:
options:
login_user:
description:
The username for use in HTTP basic authentication.
- The username for use in HTTP basic authentication.
type: str
required: true
login_password:
description:
The password for use in HTTP basic authentication.
- The password for use in HTTP basic authentication.
type: str
required: true
auth_url:
description:
lxca https full web address
- lxca https full web address
type: str
required: true
requirements:

View file

@ -1,37 +1,41 @@
# -*- coding: utf-8 -*-
#
# Copyright 2018 www.privaz.io Valletech AB
# Copyright: (c) 2018, www.privaz.io Valletech AB
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# OpenNebula common documentation
DOCUMENTATION = '''
DOCUMENTATION = r'''
options:
api_url:
description:
- The ENDPOINT URL of the XMLRPC server.
If not specified then the value of the ONE_URL environment variable, if any, is used.
- If not specified then the value of the ONE_URL environment variable, if any, is used.
type: str
aliases:
- api_endpoint
api_username:
description:
- The name of the user for XMLRPC authentication.
If not specified then the value of the ONE_USERNAME environment variable, if any, is used.
- If not specified then the value of the ONE_USERNAME environment variable, if any, is used.
type: str
api_password:
description:
- The password or token for XMLRPC authentication.
If not specified then the value of the ONE_PASSWORD environment variable, if any, is used.
- If not specified then the value of the ONE_PASSWORD environment variable, if any, is used.
type: str
aliases:
- api_token
validate_certs:
description:
- Whether to validate the SSL certificates or not.
This parameter is ignored if PYTHONHTTPSVERIFY environment variable is used.
- This parameter is ignored if PYTHONHTTPSVERIFY environment variable is used.
type: bool
default: true
default: yes
wait_timeout:
description:
- time to wait for the desired state to be reached before timeout, in seconds.
- Time to wait for the desired state to be reached before timeout, in seconds.
type: int
default: 300
'''

View file

@ -1,25 +1,13 @@
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# -*- coding: utf-8 -*-
# Copyright: (c) 2014, Hewlett-Packard Development Company, L.P.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# Standard openstack documentation fragment
DOCUMENTATION = '''
DOCUMENTATION = r'''
options:
cloud:
description:
@ -30,7 +18,7 @@ options:
or if OpenStack OS_* environment variables are present.
If I(cloud) is a dict, it contains a complete cloud configuration like
would be in a section of clouds.yaml.
required: false
type: str
auth:
description:
- Dictionary containing auth information as needed by the cloud's auth
@ -40,59 +28,59 @@ options:
this param will need to contain whatever parameters that auth plugin
requires. This parameter is not needed if a named cloud is provided or
OpenStack OS_* environment variables are present.
required: false
type: str
auth_type:
description:
- Name of the auth plugin to use. If the cloud uses something other than
password authentication, the name of the plugin should be indicated here
and the contents of the I(auth) parameter should be updated accordingly.
required: false
type: str
region_name:
description:
- Name of the region.
required: false
type: str
wait:
description:
- Should ansible wait until the requested resource is complete.
type: bool
required: false
default: true
default: yes
timeout:
description:
- How long should ansible wait for the requested resource.
required: false
type: int
default: 180
api_timeout:
description:
- How long should the socket layer wait before timing out for API calls.
If this is omitted, nothing will be passed to the requests library.
required: false
type: int
verify:
description:
- Whether or not SSL API requests should be verified. Before 2.3 this defaulted to True.
- Whether or not SSL API requests should be verified.
- Before Ansible 2.3 this defaulted to C(yes).
type: bool
required: false
aliases: ['validate_certs']
default: no
aliases: [ validate_certs ]
cacert:
description:
- A path to a CA Cert bundle that can be used as part of verifying
SSL API requests.
required: false
type: path
cert:
description:
- A path to a client certificate to use as part of the SSL transaction.
required: false
type: path
key:
description:
- A path to a client key to use as part of the SSL transaction.
required: false
type: path
interface:
description:
- Endpoint URL type to fetch from the service catalog.
choices: [public, internal, admin]
required: false
type: str
choices: [ admin, internal, public ]
default: public
aliases: ['endpoint_type']
aliases: [ endpoint_type ]
version_added: "2.3"
requirements:
- python >= 2.7

View file

@ -1,48 +1,33 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016 Red Hat, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright: (c) 2016, Red Hat, Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# Standard oVirt documentation fragment
DOCUMENTATION = '''
DOCUMENTATION = r'''
options:
wait:
description:
- "I(True) if the module should wait for the entity to get into desired state."
default: true
- "C(yes) if the module should wait for the entity to get into desired state."
type: bool
default: yes
fetch_nested:
description:
- "If I(True) the module will fetch additional data from the API."
- "It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other
attributes of the nested entities by specifying C(nested_attributes)."
version_added: "2.3"
type: bool
version_added: "2.3"
nested_attributes:
description:
- "Specifies list of the attributes which should be fetched from the API."
- "This parameter apply only when C(fetch_nested) is I(true)."
type: list
version_added: "2.3"
auth:
required: True
description:
- "Dictionary with values needed to create HTTP/HTTPS connection to oVirt:"
- C(username)[I(required)] - The name of the user, something like I(admin@internal).
@ -64,14 +49,18 @@ options:
- "C(kerberos) - A boolean flag indicating if Kerberos authentication
should be used instead of the default basic authentication."
- "C(headers) - Dictionary of HTTP headers to be added to each API call."
type: dict
required: true
timeout:
description:
- "The amount of time in seconds the module should wait for the instance to
get into desired state."
type: int
default: 180
poll_interval:
description:
- "Number of the seconds the module waits until another poll request on entity status is sent."
type: int
default: 3
requirements:
- python >= 2.7

View file

@ -1,43 +1,28 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016 Red Hat, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright: (c) 2016, Red Hat, Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# facts standard oVirt documentation fragment
DOCUMENTATION = '''
DOCUMENTATION = r'''
options:
fetch_nested:
description:
- "If I(True) the module will fetch additional data from the API."
- "It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other
attributes of the nested entities by specifying C(nested_attributes)."
version_added: "2.3"
- If I(yes) the module will fetch additional data from the API.
- It will fetch IDs of the VMs disks, snapshots, etc. User can configure to fetch other
attributes of the nested entities by specifying C(nested_attributes).
type: bool
version_added: "2.3"
nested_attributes:
description:
- "Specifies list of the attributes which should be fetched from the API."
- "This parameter apply only when C(fetch_nested) is I(true)."
- Specifies list of the attributes which should be fetched from the API.
- This parameter apply only when C(fetch_nested) is I(true).
type: list
version_added: "2.3"
auth:
required: True
description:
- "Dictionary with values needed to create HTTP/HTTPS connection to oVirt:"
- C(username)[I(required)] - The name of the user, something like I(admin@internal).
@ -59,6 +44,8 @@ options:
- "C(kerberos) - A boolean flag indicating if Kerberos authentication
should be used instead of the default basic authentication."
- "C(headers) - Dictionary of HTTP headers to be added to each API call."
type: dict
required: true
requirements:
- python >= 2.7
- ovirt-engine-sdk-python >= 4.2.4

View file

@ -1,55 +1,47 @@
# (c) 2014, Matt Martz <matt@sivel.net>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# -*- coding: utf-8 -*-
# Copyright: (c) 2014, Matt Martz <matt@sivel.net>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# Standard Rackspace only documentation fragment
DOCUMENTATION = """
DOCUMENTATION = r'''
options:
api_key:
description:
- Rackspace API key, overrides I(credentials).
aliases:
- password
type: str
aliases: [ password ]
credentials:
description:
- File to find the Rackspace credentials in. Ignored if I(api_key) and
I(username) are provided.
aliases:
- creds_file
type: path
aliases: [ creds_file ]
env:
description:
- Environment as configured in I(~/.pyrax.cfg),
see U(https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration).
version_added: 1.5
type: str
version_added: '1.5'
region:
description:
- Region to create an instance in.
type: str
default: DFW
username:
description:
- Rackspace username, overrides I(credentials).
type: str
verify_ssl:
description:
- Whether or not to require SSL validation of API endpoints.
version_added: 1.5
type: bool
version_added: '1.5'
requirements:
- "python >= 2.6"
- python >= 2.6
- pyrax
notes:
- The following environment variables can be used, C(RAX_USERNAME),
@ -58,38 +50,36 @@ notes:
appropriate for pyrax. See U(https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating)
- C(RAX_USERNAME) and C(RAX_API_KEY) obviate the use of a credentials file
- C(RAX_REGION) defines a Rackspace Public Cloud region (DFW, ORD, LON, ...)
"""
'''
# Documentation fragment including attributes to enable communication
# of other OpenStack clouds. Not all rax modules support this.
OPENSTACK = """
OPENSTACK = r'''
options:
api_key:
description:
- Rackspace API key, overrides I(credentials).
aliases:
- password
aliases: [ password ]
auth_endpoint:
description:
- The URI of the authentication service.
default: https://identity.api.rackspacecloud.com/v2.0/
version_added: 1.5
version_added: '1.5'
credentials:
description:
- File to find the Rackspace credentials in. Ignored if I(api_key) and
I(username) are provided.
aliases:
- creds_file
aliases: [ creds_file ]
env:
description:
- Environment as configured in I(~/.pyrax.cfg),
see U(https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration).
version_added: 1.5
version_added: '1.5'
identity_type:
description:
- Authentication mechanism to use, such as rackspace or keystone.
default: rackspace
version_added: 1.5
version_added: '1.5'
region:
description:
- Region to create an instance in.
@ -97,21 +87,21 @@ options:
tenant_id:
description:
- The tenant ID used for authentication.
version_added: 1.5
version_added: '1.5'
tenant_name:
description:
- The tenant name used for authentication.
version_added: 1.5
version_added: '1.5'
username:
description:
- Rackspace username, overrides I(credentials).
verify_ssl:
description:
- Whether or not to require SSL validation of API endpoints.
version_added: 1.5
version_added: '1.5'
type: bool
requirements:
- "python >= 2.6"
- python >= 2.6
- pyrax
notes:
- The following environment variables can be used, C(RAX_USERNAME),
@ -120,4 +110,4 @@ notes:
appropriate for pyrax. See U(https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#authenticating)
- C(RAX_USERNAME) and C(RAX_API_KEY) obviate the use of a credentials file
- C(RAX_REGION) defines a Rackspace Public Cloud region (DFW, ORD, LON, ...)
"""
'''

View file

@ -1,37 +1,41 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2018 Yanis Guenane <yanis+ansible@guenane.org>
# Copyright: (c) 2018, Yanis Guenane <yanis+ansible@guenane.org>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# Standard documentation fragment
DOCUMENTATION = '''
DOCUMENTATION = r'''
options:
api_token:
description:
- Scaleway OAuth token.
aliases: ['oauth_token']
type: str
aliases: [ oauth_token ]
api_url:
description:
- Scaleway API URL
default: 'https://api.scaleway.com'
aliases: ['base_url']
- Scaleway API URL.
type: str
default: https://api.scaleway.com
aliases: [ base_url ]
api_timeout:
description:
- HTTP timeout to Scaleway API in seconds.
type: int
default: 30
aliases: ['timeout']
aliases: [ timeout ]
query_parameters:
description:
- List of parameters passed to the query string
- List of parameters passed to the query string.
type: dict
default: {}
validate_certs:
description:
- Validate SSL certs of the Scaleway API.
default: yes
type: bool
default: yes
notes:
- Also see the API documentation on U(https://developer.scaleway.com/)
- If C(api_token) is not set within the module, the following

View file

@ -52,7 +52,7 @@ options:
description:
- If the certificates of the authentication is to be verified.
type: bool
default: 'yes'
default: yes
vdc_name:
description:
- The name of the vdc where the gateway is located.

View file

@ -1,3 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2016, Charles Paul <cpaul@ansible.com>
# Copyright: (c) 2018, Ansible Project
# Copyright: (c) 2019, Abhijeet Kasurde <akasurde@redhat.com>
@ -6,83 +8,83 @@
class ModuleDocFragment(object):
# Parameters for VMware modules
DOCUMENTATION = '''
DOCUMENTATION = r'''
options:
hostname:
description:
- The hostname or IP address of the vSphere vCenter or ESXi server.
- If the value is not specified in the task, the value of environment variable C(VMWARE_HOST) will be used instead.
- Environment variable support added in version 2.6.
- Environment variable support added in Ansible 2.6.
type: str
username:
description:
- The username of the vSphere vCenter or ESXi server.
- If the value is not specified in the task, the value of environment variable C(VMWARE_USER) will be used instead.
- Environment variable support added in version 2.6.
- Environment variable support added in Ansible 2.6.
type: str
aliases: [ admin, user ]
password:
description:
- The password of the vSphere vCenter or ESXi server.
- If the value is not specified in the task, the value of environment variable C(VMWARE_PASSWORD) will be used instead.
- Environment variable support added in version 2.6.
- Environment variable support added in Ansible 2.6.
type: str
aliases: [ pass, pwd ]
validate_certs:
description:
- Allows connection when SSL certificates are not valid. Set to C(false) when certificates are not trusted.
- If the value is not specified in the task, the value of environment variable C(VMWARE_VALIDATE_CERTS) will be used instead.
- Environment variable support added in version 2.6.
- Environment variable support added in Ansible 2.6.
- If set to C(yes), please make sure Python >= 2.7.9 is installed on the given machine.
type: bool
default: 'yes'
default: yes
port:
description:
- The port number of the vSphere vCenter or ESXi server.
- If the value is not specified in the task, the value of environment variable C(VMWARE_PORT) will be used instead.
- Environment variable support added in version 2.6.
- Environment variable support added in Ansible 2.6.
type: int
default: 443
version_added: 2.5
version_added: '2.5'
'''
# This doc fragment is specific to vcenter modules like vcenter_license
VCENTER_DOCUMENTATION = '''
VCENTER_DOCUMENTATION = r'''
options:
hostname:
description:
- The hostname or IP address of the vSphere vCenter server.
- If the value is not specified in the task, the value of environment variable C(VMWARE_HOST) will be used instead.
- Environment variable supported added in version 2.6.
- Environment variable supported added in Ansible 2.6.
type: str
username:
description:
- The username of the vSphere vCenter server.
- If the value is not specified in the task, the value of environment variable C(VMWARE_USER) will be used instead.
- Environment variable supported added in version 2.6.
- Environment variable supported added in Ansible 2.6.
type: str
aliases: [ admin, user ]
password:
description:
- The password of the vSphere vCenter server.
- If the value is not specified in the task, the value of environment variable C(VMWARE_PASSWORD) will be used instead.
- Environment variable supported added in version 2.6.
- Environment variable supported added in Ansible 2.6.
type: str
aliases: [ pass, pwd ]
validate_certs:
description:
- Allows connection when SSL certificates are not valid. Set to C(false) when certificates are not trusted.
- If the value is not specified in the task, the value of environment variable C(VMWARE_VALIDATE_CERTS) will be used instead.
- Environment variable supported added in version 2.6.
- Environment variable supported added in Ansible 2.6.
- If set to C(yes), please make sure Python >= 2.7.9 is installed on the given machine.
type: bool
default: 'yes'
default: yes
port:
description:
- The port number of the vSphere vCenter server.
- If the value is not specified in the task, the value of environment variable C(VMWARE_PORT) will be used instead.
- Environment variable supported added in version 2.6.
- Environment variable supported added in Ansible 2.6.
type: int
default: 443
version_added: 2.5
version_added: '2.5'
'''

View file

@ -29,14 +29,14 @@ options:
validate_certs:
description:
- Allows connection when SSL certificates are not valid.
- Set to C(false) when certificates are not trusted.
- Set to C(no) when certificates are not trusted.
- If the value is not specified in the task, the value of environment variable C(VMWARE_VALIDATE_CERTS) will be used instead.
type: bool
default: true
default: yes
protocol:
description:
- The connection to protocol.
type: str
choices: [ https, http ]
choices: [ http, https ]
default: https
'''

View file

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017 René Moser <mail@renemoser.net>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
@ -6,39 +7,44 @@
class ModuleDocFragment(object):
# Standard documentation fragment
DOCUMENTATION = '''
DOCUMENTATION = r'''
options:
api_key:
description:
- API key of the Vultr API.
- The ENV variable C(VULTR_API_KEY) is used as default, when defined.
type: str
api_timeout:
description:
- HTTP timeout to Vultr API.
- The ENV variable C(VULTR_API_TIMEOUT) is used as default, when defined.
- Fallback value is 60 seconds if not specified.
type: int
api_retries:
description:
- Amount of retries in case of the Vultr API retuns an HTTP 503 code.
- The ENV variable C(VULTR_API_RETRIES) is used as default, when defined.
- Fallback value is 5 retries if not specified.
type: int
api_account:
description:
- Name of the ini section in the C(vultr.ini) file.
- The ENV variable C(VULTR_API_ACCOUNT) is used as default, when defined.
type: str
default: default
api_endpoint:
description:
- URL to API endpint (without trailing slash).
- The ENV variable C(VULTR_API_ENDPOINT) is used as default, when defined.
- Fallback value is U(https://api.vultr.com) if not specified.
type: str
validate_certs:
description:
- Validate SSL certs of the Vultr API.
default: yes
type: bool
default: yes
requirements:
- "python >= 2.6"
- python >= 2.6
notes:
- Also see the API documentation on https://www.vultr.com/api/.
'''

View file

@ -1,35 +1,37 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Bojan Vitnik <bvitnik@mainstream.rs>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# Parameters for XenServer modules
DOCUMENTATION = '''
DOCUMENTATION = r'''
options:
hostname:
description:
- The hostname or IP address of the XenServer host or XenServer pool master.
- If the value is not specified in the task, the value of environment variable C(XENSERVER_HOST) will be used instead.
required: False
default: 'localhost'
aliases: ['host', 'pool']
type: str
default: localhost
aliases: [ host, pool ]
username:
description:
- The username to use for connecting to XenServer.
- If the value is not specified in the task, the value of environment variable C(XENSERVER_USER) will be used instead.
required: False
type: str
default: 'root'
aliases: ['user', 'admin']
aliases: [ admin, user ]
password:
description:
- The password to use for connecting to XenServer.
- If the value is not specified in the task, the value of environment variable C(XENSERVER_PASSWORD) will be used instead.
required: False
aliases: ['pass', 'pwd']
type: str
aliases: [ pass, pwd ]
validate_certs:
description:
- Allows connection when SSL certificates are not valid. Set to C(false) when certificates are not trusted.
- If the value is not specified in the task, the value of environment variable C(XENSERVER_VALIDATE_CERTS) will be used instead.
default: 'yes'
type: bool
default: yes
'''