mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 03:11:24 -07:00
[prox ... pyth]*: normalize docs (#9364)
* [prox ... pyth]*: normalize docs * Apply suggestions from code review Co-authored-by: IamLunchbox <56757745+IamLunchbox@users.noreply.github.com> * Update plugins/modules/pushbullet.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/pushbullet.py Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: IamLunchbox <56757745+IamLunchbox@users.noreply.github.com> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
9fc3092bb3
commit
6b7ea3443d
23 changed files with 633 additions and 729 deletions
|
@ -8,8 +8,7 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: proxmox
|
||||
short_description: Management of instances in Proxmox VE cluster
|
||||
description:
|
||||
|
@ -26,28 +25,26 @@ attributes:
|
|||
options:
|
||||
password:
|
||||
description:
|
||||
- the instance root password
|
||||
- The instance root password.
|
||||
type: str
|
||||
hostname:
|
||||
description:
|
||||
- the instance hostname
|
||||
- required only for O(state=present)
|
||||
- must be unique if vmid is not passed
|
||||
- The instance hostname.
|
||||
- Required only for O(state=present).
|
||||
- Must be unique if vmid is not passed.
|
||||
type: str
|
||||
ostemplate:
|
||||
description:
|
||||
- the template for VM creating
|
||||
- required only for O(state=present)
|
||||
- The template for VM creating.
|
||||
- Required only for O(state=present).
|
||||
type: str
|
||||
disk:
|
||||
description:
|
||||
- This option was previously described as "hard disk size in GB for instance" however several formats describing
|
||||
a lxc mount are permitted.
|
||||
- Older versions of Proxmox will accept a numeric value for size using the O(storage) parameter to automatically
|
||||
choose which storage to allocate from, however new versions enforce the C(<STORAGE>:<SIZE>) syntax.
|
||||
- "Additional options are available by using some combination of the following key-value pairs as a
|
||||
comma-delimited list C([volume=]<volume> [,acl=<1|0>] [,mountoptions=<opt[;opt...]>] [,quota=<1|0>]
|
||||
[,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>])."
|
||||
- This option was previously described as "hard disk size in GB for instance" however several formats describing a lxc mount are permitted.
|
||||
- Older versions of Proxmox will accept a numeric value for size using the O(storage) parameter to automatically choose which storage to
|
||||
allocate from, however new versions enforce the C(<STORAGE>:<SIZE>) syntax.
|
||||
- Additional options are available by using some combination of the following key-value pairs as a comma-delimited list C([volume=]<volume>
|
||||
[,acl=<1|0>] [,mountoptions=<opt[;opt...]>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]).
|
||||
- See U(https://pve.proxmox.com/wiki/Linux_Container) for a full description.
|
||||
- This option is mutually exclusive with O(storage) and O(disk_volume).
|
||||
type: str
|
||||
|
@ -93,19 +90,19 @@ options:
|
|||
type: int
|
||||
cpus:
|
||||
description:
|
||||
- numbers of allocated cpus for instance
|
||||
- Number of allocated cpus for instance.
|
||||
type: int
|
||||
memory:
|
||||
description:
|
||||
- memory size in MB for instance
|
||||
- Memory size in MB for instance.
|
||||
type: int
|
||||
swap:
|
||||
description:
|
||||
- swap memory size in MB for instance
|
||||
- Swap memory size in MB for instance.
|
||||
type: int
|
||||
netif:
|
||||
description:
|
||||
- specifies network interfaces for the container. As a hash/dictionary defining interfaces.
|
||||
- Specifies network interfaces for the container. As a hash/dictionary defining interfaces.
|
||||
type: dict
|
||||
features:
|
||||
description:
|
||||
|
@ -177,11 +174,11 @@ options:
|
|||
type: dict
|
||||
ip_address:
|
||||
description:
|
||||
- specifies the address the container will be assigned
|
||||
- Specifies the address the container will be assigned.
|
||||
type: str
|
||||
onboot:
|
||||
description:
|
||||
- specifies whether a VM will be started during system bootup
|
||||
- Specifies whether a VM will be started during system bootup.
|
||||
type: bool
|
||||
storage:
|
||||
description:
|
||||
|
@ -199,15 +196,15 @@ options:
|
|||
version_added: 8.1.0
|
||||
cpuunits:
|
||||
description:
|
||||
- CPU weight for a VM
|
||||
- CPU weight for a VM.
|
||||
type: int
|
||||
nameserver:
|
||||
description:
|
||||
- sets DNS server IP address for a container
|
||||
- Sets DNS server IP address for a container.
|
||||
type: str
|
||||
searchdomain:
|
||||
description:
|
||||
- sets DNS search domain for a container
|
||||
- Sets DNS search domain for a container.
|
||||
type: str
|
||||
tags:
|
||||
description:
|
||||
|
@ -219,7 +216,7 @@ options:
|
|||
version_added: 6.2.0
|
||||
timeout:
|
||||
description:
|
||||
- timeout for operations
|
||||
- Timeout for operations.
|
||||
type: int
|
||||
default: 30
|
||||
update:
|
||||
|
@ -232,8 +229,8 @@ options:
|
|||
description:
|
||||
- Forcing operations.
|
||||
- Can be used only with states V(present), V(stopped), V(restarted).
|
||||
- with O(state=present) force option allow to overwrite existing container.
|
||||
- with states V(stopped), V(restarted) allow to force stop instance.
|
||||
- With O(state=present) force option allow to overwrite existing container.
|
||||
- With states V(stopped), V(restarted) allow to force stop instance.
|
||||
type: bool
|
||||
default: false
|
||||
purge:
|
||||
|
@ -247,14 +244,14 @@ options:
|
|||
version_added: 2.3.0
|
||||
state:
|
||||
description:
|
||||
- Indicate desired state of the instance
|
||||
- V(template) was added in community.general 8.1.0.
|
||||
- Indicate desired state of the instance.
|
||||
- V(template) was added in community.general 8.1.0.
|
||||
type: str
|
||||
choices: ['present', 'started', 'absent', 'stopped', 'restarted', 'template']
|
||||
default: present
|
||||
pubkey:
|
||||
description:
|
||||
- Public key to add to /root/.ssh/authorized_keys. This was added on Proxmox 4.2, it is ignored for earlier versions
|
||||
- Public key to add to /root/.ssh/authorized_keys. This was added on Proxmox 4.2, it is ignored for earlier versions.
|
||||
type: str
|
||||
unprivileged:
|
||||
description:
|
||||
|
@ -292,8 +289,8 @@ options:
|
|||
- Type of the clone created.
|
||||
- V(full) creates a full clone, and O(storage) must be specified.
|
||||
- V(linked) creates a linked clone, and the cloned container must be a template container.
|
||||
- V(opportunistic) creates a linked clone if the cloned container is a template container, and a full clone if not.
|
||||
O(storage) may be specified, if not it will fall back to the default.
|
||||
- V(opportunistic) creates a linked clone if the cloned container is a template container, and a full clone if not. O(storage) may be specified,
|
||||
if not it will fall back to the default.
|
||||
type: str
|
||||
choices: ['full', 'linked', 'opportunistic']
|
||||
default: opportunistic
|
||||
|
@ -306,9 +303,9 @@ extends_documentation_fragment:
|
|||
- community.general.proxmox.documentation
|
||||
- community.general.proxmox.selection
|
||||
- community.general.attributes
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = r'''
|
||||
EXAMPLES = r"""
|
||||
- name: Create new container with minimal options
|
||||
community.general.proxmox:
|
||||
vmid: 100
|
||||
|
@ -494,8 +491,8 @@ EXAMPLES = r'''
|
|||
hostname: example.org
|
||||
ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz'
|
||||
features:
|
||||
- nesting=1
|
||||
- mount=cifs,nfs
|
||||
- nesting=1
|
||||
- mount=cifs,nfs
|
||||
|
||||
- name: >
|
||||
Create a linked clone of the template container with id 100. The newly created container with be a
|
||||
|
@ -599,7 +596,7 @@ EXAMPLES = r'''
|
|||
api_password: 1q2w3e
|
||||
api_host: node1
|
||||
state: absent
|
||||
'''
|
||||
"""
|
||||
|
||||
import re
|
||||
import time
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue