community.proxmox.proxmox_node module – Manage Proxmox VE nodes
Note
This module is part of the community.proxmox collection (version 1.3.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.0
- requests
Parameters
Parameter | Comments |
|---|---|
api_host string / required | Specify the target host of the Proxmox VE cluster. Uses the |
api_password string | Specify the password to authenticate with. Uses the |
api_port integer | Specify the target port of the Proxmox VE cluster. Uses the |
api_token_id string | Specify the token ID. Uses the |
api_token_secret string | Specify the token secret. Uses the |
api_user string / required | Specify the user to authenticate with. Uses the |
certificates dictionary | Manages the x509 certificates of the node. |
|
cert string |
The public certificate file (including chain) in PEM format. |
|
force boolean |
Overwrite existing custom or ACME certificate files. Choices:
|
|
key string |
The private key file in PEM format. |
|
restart boolean |
Restart pveproxy to rehash the new certificates. Choices:
|
|
state string |
Defines the actions for the certificate. Choices:
|
dns dictionary | Manages the resolving DNS options of the node. |
|
dns1 string |
The IP address of the first DNS resolver. |
|
dns2 string |
The IP address of the second DNS resolver. |
|
dns3 string |
The IP address of the third DNS resolver. |
|
search string / required |
The default search domain. |
node_name string / required | The targeted node to perform actions on. |
power_state string | Manages the power state of the node. Choices:
|
subscription dictionary | Manages the license subscription of the node. |
|
key string |
The subscription license key. |
|
state string |
Defines the actions for the subscription file. Choices:
|
validate_certs boolean | If This should only be used on personally controlled sites using self-signed certificates. Uses the Choices:
|
Attributes
Attribute | Support | Description |
|---|---|---|
action_group | Action group: community.proxmox.proxmox | Use |
check_mode | Support: full | Can run in |
diff_mode | Support: none | Will return details on what has changed (or possibly needs changing in |
Examples
- name: Start a Proxmox VE Node
community.proxmox.node:
api_host: proxmoxhost
api_user: root@pam
api_password: password123
validate_certs: false
node_name: de-cgn01-virt01
power_state: online
- name: Update SSL certificates on a Proxmox VE Node
community.proxmox.node:
api_host: proxmoxhost
api_user: root@pam
api_password: password123
validate_certs: false
node_name: de-cgn01-virt01
certificates:
key: /opt/ansible/key.pem
cert: /opt/ansible/cert.pem
state: present
force: false
- name: Place a subscription license on a Proxmox VE Node
community.proxmox.node:
api_host: proxmoxhost
api_user: root@pam
api_password: password123
validate_certs: false
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 |
|---|---|
certificates string | Status message about the certificate on the node. Returned: success Sample: |
changed boolean | Indicates whether any changes were made. Returned: success Sample: |
dns string | Status message about the DNS configuration on the node. Returned: success Sample: |
power_state string | Status message about the power state of the node. Returned: success Sample: |
Collection links
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/proxmox/proxmox_node_module.html