mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
moved module_doc_fragments to v2
This commit is contained in:
parent
fd321355d6
commit
8fdf9ae59b
7 changed files with 0 additions and 0 deletions
|
@ -1 +0,0 @@
|
|||
../../../lib/ansible/utils/module_docs_fragments
|
0
lib/ansible/utils/module_docs_fragments/__init__.py
Normal file
0
lib/ansible/utils/module_docs_fragments/__init__.py
Normal file
78
lib/ansible/utils/module_docs_fragments/aws.py
Normal file
78
lib/ansible/utils/module_docs_fragments/aws.py
Normal file
|
@ -0,0 +1,78 @@
|
|||
# (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/>.
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
|
||||
# AWS only documentation fragment
|
||||
DOCUMENTATION = """
|
||||
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.
|
||||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
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.
|
||||
required: false
|
||||
default: null
|
||||
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.
|
||||
required: false
|
||||
default: null
|
||||
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.
|
||||
required: false
|
||||
default: null
|
||||
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.
|
||||
required: false
|
||||
default: "yes"
|
||||
choices: ["yes", "no"]
|
||||
aliases: []
|
||||
version_added: "1.5"
|
||||
profile:
|
||||
description:
|
||||
- uses a boto profile. Only works with boto >= 2.24.0
|
||||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
version_added: "1.6"
|
||||
requirements:
|
||||
- boto
|
||||
notes:
|
||||
- If parameters are not set within the module, the following
|
||||
environment variables can be used in decreasing order of precedence
|
||||
C(AWS_URL) or C(EC2_URL),
|
||||
C(AWS_ACCESS_KEY_ID) or C(AWS_ACCESS_KEY) or C(EC2_ACCESS_KEY),
|
||||
C(AWS_SECRET_ACCESS_KEY) or C(AWS_SECRET_KEY) or C(EC2_SECRET_KEY),
|
||||
C(AWS_SECURITY_TOKEN) or C(EC2_SECURITY_TOKEN),
|
||||
C(AWS_REGION) or C(EC2_REGION)
|
||||
- Ansible uses the boto configuration file (typically ~/.boto) if no
|
||||
credentials are provided. See http://boto.readthedocs.org/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
|
||||
"""
|
62
lib/ansible/utils/module_docs_fragments/cloudstack.py
Normal file
62
lib/ansible/utils/module_docs_fragments/cloudstack.py
Normal file
|
@ -0,0 +1,62 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2015 René Moser <mail@renemoser.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/>.
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
|
||||
# Standard cloudstack documentation fragment
|
||||
DOCUMENTATION = '''
|
||||
options:
|
||||
api_key:
|
||||
description:
|
||||
- API key of the CloudStack API.
|
||||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
api_secret:
|
||||
description:
|
||||
- Secret key of the CloudStack API.
|
||||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
api_url:
|
||||
description:
|
||||
- URL of the CloudStack API e.g. https://cloud.example.com/client/api.
|
||||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
api_http_method:
|
||||
description:
|
||||
- HTTP method used.
|
||||
required: false
|
||||
default: 'get'
|
||||
aliases: []
|
||||
requirements:
|
||||
- cs
|
||||
notes:
|
||||
- Ansible uses the C(cs) library's configuration method if credentials are not
|
||||
provided by the options C(api_url), C(api_key), C(api_secret).
|
||||
Configuration is read from several locations, in the following order:
|
||||
- The C(CLOUDSTACK_ENDPOINT), C(CLOUDSTACK_KEY), C(CLOUDSTACK_SECRET) and
|
||||
C(CLOUDSTACK_METHOD) environment variables.
|
||||
- A C(CLOUDSTACK_CONFIG) environment variable pointing to an C(.ini) file,
|
||||
- A C(cloudstack.ini) file in the current working directory.
|
||||
- A C(.cloudstack.ini) file in the users home directory.
|
||||
See https://github.com/exoscale/cs for more information.
|
||||
- This module supports check mode.
|
||||
'''
|
78
lib/ansible/utils/module_docs_fragments/files.py
Normal file
78
lib/ansible/utils/module_docs_fragments/files.py
Normal file
|
@ -0,0 +1,78 @@
|
|||
# (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/>.
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
|
||||
# Standard files documentation fragment
|
||||
DOCUMENTATION = """
|
||||
options:
|
||||
mode:
|
||||
required: false
|
||||
default: null
|
||||
choices: []
|
||||
description:
|
||||
- mode the file or directory should be, such as 0644 as would be fed to I(chmod). As of version 1.8, the mode may be specified as a symbolic mode (for example, C(u+rwx) or C(u=rw,g=r,o=r)).
|
||||
owner:
|
||||
required: false
|
||||
default: null
|
||||
choices: []
|
||||
description:
|
||||
- name of the user that should own the file/directory, as would be fed to I(chown)
|
||||
group:
|
||||
required: false
|
||||
default: null
|
||||
choices: []
|
||||
description:
|
||||
- name of the group that should own the file/directory, as would be fed to I(chown)
|
||||
seuser:
|
||||
required: false
|
||||
default: null
|
||||
choices: []
|
||||
description:
|
||||
- user part of SELinux file context. Will default to system policy, if
|
||||
applicable. If set to C(_default), it will use the C(user) portion of the
|
||||
policy if available
|
||||
serole:
|
||||
required: false
|
||||
default: null
|
||||
choices: []
|
||||
description:
|
||||
- role part of SELinux file context, C(_default) feature works as for I(seuser).
|
||||
setype:
|
||||
required: false
|
||||
default: null
|
||||
choices: []
|
||||
description:
|
||||
- type part of SELinux file context, C(_default) feature works as for I(seuser).
|
||||
selevel:
|
||||
required: false
|
||||
default: "s0"
|
||||
choices: []
|
||||
description:
|
||||
- level part of the SELinux file context. This is the MLS/MCS attribute,
|
||||
sometimes known as the C(range). C(_default) feature works as for
|
||||
I(seuser).
|
||||
follow:
|
||||
required: false
|
||||
default: "no"
|
||||
choices: [ "yes", "no" ]
|
||||
version_added: "1.8"
|
||||
description:
|
||||
- 'This flag indicates that filesystem links, if they exist, should be followed.'
|
||||
|
||||
"""
|
103
lib/ansible/utils/module_docs_fragments/openstack.py
Normal file
103
lib/ansible/utils/module_docs_fragments/openstack.py
Normal file
|
@ -0,0 +1,103 @@
|
|||
# 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/>.
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
|
||||
# Standard openstack documentation fragment
|
||||
DOCUMENTATION = '''
|
||||
options:
|
||||
cloud:
|
||||
description:
|
||||
- Named cloud to operate against. Provides default values for I(auth) and I(auth_plugin)
|
||||
required: false
|
||||
auth:
|
||||
description:
|
||||
- Dictionary containing auth information as needed by the cloud's auth
|
||||
plugin strategy. For the default I{password) plugin, this would contain
|
||||
I(auth_url), I(username), I(password), I(project_name) and any
|
||||
information about domains if the cloud supports them. For other plugins,
|
||||
this param will need to contain whatever parameters that auth plugin
|
||||
requires. This parameter is not needed if a named cloud is provided.
|
||||
required: false
|
||||
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
|
||||
default: password
|
||||
region_name:
|
||||
description:
|
||||
- Name of the region.
|
||||
required: false
|
||||
availability_zone:
|
||||
description:
|
||||
- Name of the availability zone.
|
||||
required: false
|
||||
wait:
|
||||
description:
|
||||
- Should ansible wait until the requested resource is complete.
|
||||
required: false
|
||||
default: "yes"
|
||||
choices: ["yes", "no"]
|
||||
timeout:
|
||||
description:
|
||||
- How long should ansible wait for the requested resource.
|
||||
required: false
|
||||
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
|
||||
default: None
|
||||
validate_certs:
|
||||
description:
|
||||
- Whether or not SSL API requests should be verified.
|
||||
required: false
|
||||
default: True
|
||||
aliases: ['verify']
|
||||
cacert:
|
||||
description:
|
||||
- A path to a CA Cert bundle that can be used as part of verifying
|
||||
SSL API requests.
|
||||
required: false
|
||||
cert:
|
||||
description:
|
||||
- A path to a client certificate to use as part of the SSL transaction
|
||||
required: false
|
||||
key:
|
||||
description:
|
||||
- A path to a client key to use as part of the SSL transaction
|
||||
required: false
|
||||
endpoint_type:
|
||||
description:
|
||||
- Endpoint URL type to fetch from the service catalog.
|
||||
choices: [public, internal, admin]
|
||||
required: false
|
||||
default: public
|
||||
requirements: [shade]
|
||||
notes:
|
||||
- The standard OpenStack environment variables, such as C(OS_USERNAME)
|
||||
may be user instead of providing explicit values.
|
||||
- Auth information is driven by os-client-config, which means that values
|
||||
can come from a yaml config file in /etc/ansible/openstack.yaml,
|
||||
/etc/openstack/clouds.yaml or ~/.config/openstack/clouds.yaml, then from
|
||||
standard environment variables, then finally by explicit parameters in
|
||||
plays.
|
||||
'''
|
122
lib/ansible/utils/module_docs_fragments/rackspace.py
Normal file
122
lib/ansible/utils/module_docs_fragments/rackspace.py
Normal file
|
@ -0,0 +1,122 @@
|
|||
# (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/>.
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
|
||||
# Standard Rackspace only documentation fragment
|
||||
DOCUMENTATION = """
|
||||
options:
|
||||
api_key:
|
||||
description:
|
||||
- Rackspace API key (overrides I(credentials))
|
||||
aliases:
|
||||
- password
|
||||
credentials:
|
||||
description:
|
||||
- File to find the Rackspace credentials in (ignored if I(api_key) and
|
||||
I(username) are provided)
|
||||
default: null
|
||||
aliases:
|
||||
- creds_file
|
||||
env:
|
||||
description:
|
||||
- Environment as configured in ~/.pyrax.cfg,
|
||||
see U(https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration)
|
||||
version_added: 1.5
|
||||
region:
|
||||
description:
|
||||
- Region to create an instance in
|
||||
default: DFW
|
||||
username:
|
||||
description:
|
||||
- Rackspace username (overrides I(credentials))
|
||||
verify_ssl:
|
||||
description:
|
||||
- Whether or not to require SSL validation of API endpoints
|
||||
version_added: 1.5
|
||||
requirements:
|
||||
- pyrax
|
||||
notes:
|
||||
- The following environment variables can be used, C(RAX_USERNAME),
|
||||
C(RAX_API_KEY), C(RAX_CREDS_FILE), C(RAX_CREDENTIALS), C(RAX_REGION).
|
||||
- C(RAX_CREDENTIALS) and C(RAX_CREDS_FILE) points to a credentials file
|
||||
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 = """
|
||||
options:
|
||||
api_key:
|
||||
description:
|
||||
- Rackspace API key (overrides I(credentials))
|
||||
aliases:
|
||||
- password
|
||||
auth_endpoint:
|
||||
description:
|
||||
- The URI of the authentication service
|
||||
default: https://identity.api.rackspacecloud.com/v2.0/
|
||||
version_added: 1.5
|
||||
credentials:
|
||||
description:
|
||||
- File to find the Rackspace credentials in (ignored if I(api_key) and
|
||||
I(username) are provided)
|
||||
default: null
|
||||
aliases:
|
||||
- creds_file
|
||||
env:
|
||||
description:
|
||||
- Environment as configured in ~/.pyrax.cfg,
|
||||
see U(https://github.com/rackspace/pyrax/blob/master/docs/getting_started.md#pyrax-configuration)
|
||||
version_added: 1.5
|
||||
identity_type:
|
||||
description:
|
||||
- Authentication machanism to use, such as rackspace or keystone
|
||||
default: rackspace
|
||||
version_added: 1.5
|
||||
region:
|
||||
description:
|
||||
- Region to create an instance in
|
||||
default: DFW
|
||||
tenant_id:
|
||||
description:
|
||||
- The tenant ID used for authentication
|
||||
version_added: 1.5
|
||||
tenant_name:
|
||||
description:
|
||||
- The tenant name used for authentication
|
||||
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
|
||||
requirements:
|
||||
- pyrax
|
||||
notes:
|
||||
- The following environment variables can be used, C(RAX_USERNAME),
|
||||
C(RAX_API_KEY), C(RAX_CREDS_FILE), C(RAX_CREDENTIALS), C(RAX_REGION).
|
||||
- C(RAX_CREDENTIALS) and C(RAX_CREDS_FILE) points to a credentials file
|
||||
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, ...)
|
||||
"""
|
Loading…
Add table
Add a link
Reference in a new issue