2020-11-24 17:30:39 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
2022-08-08 14:24:58 +02:00
|
|
|
# Copyright (c) Ansible project
|
2022-08-05 12:28:29 +02:00
|
|
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
2020-11-24 17:30:39 +01:00
|
|
|
|
|
|
|
from __future__ import (absolute_import, division, print_function)
|
|
|
|
__metaclass__ = type
|
|
|
|
|
|
|
|
|
|
|
|
class ModuleDocFragment(object):
|
|
|
|
# Common parameters for Proxmox VE modules
|
|
|
|
DOCUMENTATION = r'''
|
|
|
|
options:
|
|
|
|
api_host:
|
|
|
|
description:
|
|
|
|
- Specify the target host of the Proxmox VE cluster.
|
|
|
|
type: str
|
|
|
|
required: true
|
2024-06-08 14:59:27 +02:00
|
|
|
api_port:
|
|
|
|
description:
|
|
|
|
- Specify the target port of the Proxmox VE cluster.
|
|
|
|
- Uses the E(PROXMOX_PORT) environment variable if not specified.
|
|
|
|
type: int
|
|
|
|
required: false
|
|
|
|
version_added: 9.1.0
|
2020-11-24 17:30:39 +01:00
|
|
|
api_user:
|
|
|
|
description:
|
|
|
|
- Specify the user to authenticate with.
|
|
|
|
type: str
|
|
|
|
required: true
|
|
|
|
api_password:
|
|
|
|
description:
|
|
|
|
- Specify the password to authenticate with.
|
2023-06-15 09:29:30 +02:00
|
|
|
- You can use E(PROXMOX_PASSWORD) environment variable.
|
2020-11-24 17:30:39 +01:00
|
|
|
type: str
|
|
|
|
api_token_id:
|
|
|
|
description:
|
|
|
|
- Specify the token ID.
|
2023-07-03 22:07:05 +02:00
|
|
|
- Requires C(proxmoxer>=1.1.0) to work.
|
2020-11-24 17:30:39 +01:00
|
|
|
type: str
|
|
|
|
version_added: 1.3.0
|
|
|
|
api_token_secret:
|
|
|
|
description:
|
|
|
|
- Specify the token secret.
|
2023-07-03 22:07:05 +02:00
|
|
|
- Requires C(proxmoxer>=1.1.0) to work.
|
2020-11-24 17:30:39 +01:00
|
|
|
type: str
|
|
|
|
version_added: 1.3.0
|
|
|
|
validate_certs:
|
|
|
|
description:
|
2023-06-10 09:28:40 +02:00
|
|
|
- If V(false), SSL certificates will not be validated.
|
2020-11-24 17:30:39 +01:00
|
|
|
- This should only be used on personally controlled sites using self-signed certificates.
|
|
|
|
type: bool
|
2022-08-24 19:58:42 +02:00
|
|
|
default: false
|
2020-11-24 17:30:39 +01:00
|
|
|
requirements: [ "proxmoxer", "requests" ]
|
2020-12-02 16:08:07 +01:00
|
|
|
'''
|
|
|
|
|
|
|
|
SELECTION = r'''
|
|
|
|
options:
|
|
|
|
vmid:
|
|
|
|
description:
|
|
|
|
- Specifies the instance ID.
|
|
|
|
- If not set the next available ID will be fetched from ProxmoxAPI.
|
|
|
|
type: int
|
|
|
|
node:
|
|
|
|
description:
|
|
|
|
- Proxmox VE node on which to operate.
|
2023-06-10 09:28:40 +02:00
|
|
|
- Only required for O(state=present).
|
2020-12-02 16:08:07 +01:00
|
|
|
- For every other states it will be autodiscovered.
|
|
|
|
type: str
|
|
|
|
pool:
|
|
|
|
description:
|
|
|
|
- Add the new VM to the specified pool.
|
|
|
|
type: str
|
2020-11-24 17:30:39 +01:00
|
|
|
'''
|
2024-05-12 10:03:06 +02:00
|
|
|
|
|
|
|
ACTIONGROUP_PROXMOX = r"""
|
|
|
|
options: {}
|
|
|
|
attributes:
|
|
|
|
action_group:
|
|
|
|
description: Use C(group/community.general.proxmox) in C(module_defaults) to set defaults for this module.
|
|
|
|
support: full
|
|
|
|
membership:
|
|
|
|
- community.general.proxmox
|
|
|
|
"""
|