maxhoesel / maxhoesel.proxmox / 5.0.1 / module / proxmox_ha Manage HA in a Proxmox cluster | "added in version" 2.8.0 of maxhoesel.proxmox" Authors: Max Hösel (@maxhoesel)maxhoesel.proxmox.proxmox_ha (5.0.1) — module
Install with ansible-galaxy collection install maxhoesel.proxmox:==5.0.1
collections: - name: maxhoesel.proxmox version: 5.0.1
Manage the HA status/membership of individual guests in a Proxmox VE cluster
# 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
name: description: - 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 C(vmid). type: str vmid: description: - Specify the VMID of the guest whose HA resource will be modified. Will be fetched automatically if C(name) is set. type: int group: description: - Specify the HA group that the guest should be a member of type: str state: choices: - present - absent - started - stopped - disabled - ignored default: started description: - 'C(present): Alias for C(started)' - 'C(absent): Will remove the HA resource if present' - 'C(started)/C(stopped)/C(disabled)/C(ignored): Will configure the resource and set the PVE HA state to the requested value' - For more information on the individual states, please refer to the PVE documentation type: str digest: description: - Specify if to prevent changes if current configuration file has different SHA1 digest. - This can be used to prevent concurrent modifications. type: str comment: description: - Add a comment to the HA resource. This comment is not parsed and is only used for documentation. type: str api_host: description: - Specify the target host of the Proxmox VE cluster. required: true type: str api_user: description: - Specify the user to authenticate with. required: true type: str max_restart: description: - Specify the maximum number of restarts to attempt before a service is considered "failed" type: int api_password: description: - Specify the password to authenticate with. - You can also use the C(PROXMOX_PASSWORD) environment variable. type: str max_relocate: description: - Specify the maximum number of relocates to attempt before a service is considered "failed" type: int validate_certs: default: false description: - Validate SSL certificate of the PVE host upon connecting type: bool