community.proxmox.proxmox_node module – Manage Proxmox VE nodes
Note
This module is part of the community.proxmox collection (version 2.0.0).
You might already have this collection installed if you are using the ansible package.
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install community.proxmox.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.proxmox.proxmox_node.
New in community.proxmox 1.2.0
Synopsis
Manage the Proxmox VE nodes itself.
Requirements
The below requirements are needed on the host that executes this module.
proxmoxer >= 2.3
requests
Parameters
Parameter |
Comments |
|---|---|
Specify the target host of the Proxmox VE cluster. Uses the |
|
Specify the OTP. Uses the |
|
Specify the password to authenticate with. Uses the |
|
Specify the target port of the Proxmox VE cluster. Uses the |
|
Time limit for requests towards the Proxmox VE API. Default: |
|
Specify the token ID. Uses the |
|
Specify the token secret. Uses the |
|
Specify the user to authenticate with. Uses the |
|
Path to a local certificate, which will be used to verify TLS connections. Ignored if |
|
Manages the x509 certificates of the node. |
|
The public certificate file path (including chain) in PEM format on the Ansible Controller. Mutually exclusive with |
|
The public certificate as a raw PEM encoded string (including chain). Mutually exclusive with |
|
Overwrite existing custom certificate files. Choices:
|
|
The private key file path in PEM format. Mutually exclusive with |
|
The private key as a raw PEM encoded string. Mutually exclusive with |
|
Restart pveproxy to rehash the new certificates. Choices:
|
|
Defines the actions for the certificate. Choices:
|
|
Manages the resolving DNS options of the node. |
|
The IP address of the first DNS resolver. |
|
The IP address of the second DNS resolver. |
|
The IP address of the third DNS resolver. |
|
The default search domain. |
|
The targeted node to perform actions on. |
|
Manages the power state of the node. Choices:
|
|
Manages the license subscription of the node. |
|
The subscription license key. |
|
Defines the actions for the subscription file. Choices:
|
|
Validate the TLS certificates used for the connection to the Proxmox VE API. May be set through the environment variable Choices:
|
Attributes
Attribute |
Support |
Description |
|---|---|---|
Action group: community.proxmox.proxmox |
Use |
|
Support: full |
Can run in |
|
Support: none |
Will return details on what has changed (or possibly needs changing in |
See Also
See also
- Authentication
Complete guide for the Proxmox API authentication
Examples
- name: Start a Proxmox VE Node
community.proxmox.node:
node_name: de-cgn01-virt01
power_state: online
- name: Update SSL certificates on a Proxmox VE Node (from files)
community.proxmox.node:
node_name: de-cgn01-virt01
certificates:
private_key_file_path: /opt/ansible/key.pem
certificate_file_path: /opt/ansible/cert.pem
state: present
force: false
- name: Update SSL certificates on a Proxmox VE Node (raw PEM)
community.proxmox.node:
node_name: de-cgn01-virt01
certificates:
certificate: "{{ pve_node_certificate_content }}"
private_key: "{{ pve_node_private_key_content }}"
state: present
- name: Place a subscription license on a Proxmox VE Node
community.proxmox.node:
node_name: de-cgn01-virt01
subscription:
state: present
key: ABCD-EFGH-IJKL-MNOP-QRST-UVWX-YZ0123456789
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Status message about the certificate on the node. Returned: success Sample: |
|
Indicates whether any changes were made. Returned: success Sample: |
|
Status message about the DNS configuration on the node. Returned: success Sample: |
|
Status message about the power state of the node. Returned: success Sample: |