maxhoesel.proxmox.proxmox_ha module – Manage HA in a Proxmox cluster
Note
This module is part of the maxhoesel.proxmox collection (version 5.1.1).
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 maxhoesel.proxmox.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: maxhoesel.proxmox.proxmox_ha.
New in maxhoesel.proxmox 2.8.0
Synopsis
Manage the HA status/membership of individual guests in a Proxmox VE cluster
Aliases: ha
Requirements
The below requirements are needed on the host that executes this module.
proxmoxer >=1.2
requests
Parameters
Parameter |
Comments |
|---|---|
Specify the target host of the Proxmox VE cluster. |
|
Specify the password to authenticate with. You can also use the |
|
Specify the user to authenticate with. |
|
Add a comment to the HA resource. This comment is not parsed and is only used for documentation. |
|
Specify if to prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications. |
|
Specify the HA group that the guest should be a member of |
|
Specify the maximum number of relocates to attempt before a service is considered “failed” |
|
Specify the maximum number of restarts to attempt before a service is considered “failed” |
|
Specify the name of the guest whose HA resource will be modified. Automatically fetches the correct VMID. You can also specify the VMID directly using |
|
For more information on the individual states, please refer to the PVE documentation Choices:
|
|
Validate SSL certificate of the PVE host upon connecting Choices:
|
|
Specify the VMID of the guest whose HA resource will be modified. Will be fetched automatically if |
Examples
# Create a basic HA resource for a guest (and ensure that the guest is started)
- proxmox_ha:
api_user: root@pam
api_password: secret
api_host: helldorado
name: myvirtualmachine
# Create a HA resource for a VMID and set the state to "stopped"
- proxomx_ha:
api_user: root@pam
api_password: secret
api_host: helldorado
vmid: 123
state: stopped
# Remove a HA resource by guest name
- proxomx_ha:
api_user: root@pam
api_password: secret
api_host: helldorado
name: myvirtualmachine
state: absent