Debian Codegraph @

ansible_collections/community/proxmox/plugins/doc_fragments/proxmox.py

raw
1 # Copyright (c) Ansible project
2 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
3 # SPDX-License-Identifier: GPL-3.0-or-later
4
5
6 class ModuleDocFragment:
7 # Common parameters for Proxmox VE modules
8 DOCUMENTATION = r"""
9 options:
10 api_host:
11 description:
12 - Specify the target host of the Proxmox VE cluster.
13 - Uses the E(PROXMOX_HOST) environment variable if not specified.
14 type: str
15 required: true
16 api_port:
17 description:
18 - Specify the target port of the Proxmox VE cluster.
19 - Uses the E(PROXMOX_PORT) environment variable if not specified.
20 type: int
21 required: false
22 api_user:
23 description:
24 - Specify the user to authenticate with.
25 - Uses the E(PROXMOX_USER) environment variable if not specified.
26 type: str
27 required: true
28 api_password:
29 description:
30 - Specify the password to authenticate with.
31 - Uses the E(PROXMOX_PASSWORD) environment variable if not specified.
32 type: str
33 api_otp:
34 description:
35 - Specify the OTP.
36 - Uses the E(PROXMOX_OTP) environment variable if not specified.
37 type: str
38 api_token_id:
39 description:
40 - Specify the token ID.
41 - Uses the E(PROXMOX_TOKEN_ID) environment variable if not specified.
42 type: str
43 api_token_secret:
44 description:
45 - Specify the token secret.
46 - Uses the E(PROXMOX_TOKEN_SECRET) environment variable if not specified.
47 type: str
48 ca_path:
49 description:
50 - Path to a local certificate, which will be used to verify TLS connections.
51 - Ignored if O(validate_certs=false).
52 type: path
53 api_timeout:
54 description:
55 - Time limit for requests towards the Proxmox VE API.
56 type: int
57 default: 5
58 validate_certs:
59 description:
60 - Validate the TLS certificates used for the connection to the Proxmox VE API.
61 - May be set through the environment variable E(PROXMOX_VALIDATE_CERTS).
62 type: bool
63 default: true
64 requirements: ["proxmoxer >= 2.3", "requests"]
65 seealso:
66 - description: Complete guide for the Proxmox API authentication
67 ref: ansible_collections.community.proxmox.docsite.authentication
68 """
69
70 SELECTION = r"""
71 options:
72 vmid:
73 description:
74 - Specifies the instance ID.
75 - If not set the next available ID will be fetched from ProxmoxAPI.
76 type: int
77 node:
78 description:
79 - Proxmox VE node on which to operate.
80 - Only required for O(state=present).
81 - For every other states it will be autodiscovered.
82 type: str
83 pool:
84 description:
85 - Add the new VM to the specified pool.
86 type: str
87 """
88
89 ACTIONGROUP_PROXMOX = r"""
90 options: {}
91 attributes:
92 action_group:
93 description: Use C(group/community.proxmox.proxmox) in C(module_defaults) to set defaults for this module.
94 support: full
95 membership:
96 - community.proxmox.proxmox
97 """