community.proxmox.proxmox_cluster_ha_rules_info module – Retrieve Proxmox VE HA rules
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_cluster_ha_rules_info.
New in community.proxmox 2.0.0
Synopsis
Retreive Proxmox VE High Availability managed resources rules
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 |
|
Target rules affecting the specified resource. |
|
Target by rule name. |
|
Target rules by type. 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 This action does not modify state. |
Can run in |
|
Support: N/A This action does not modify state. |
Will return details on what has changed (or possibly needs changing in |
See Also
See also
- community.proxmox.proxmox_cluster_ha_rules
Management of HA rules
- Proxmox HA rules configuration
Complete reference of Proxmox VE HA rules
- Authentication
Complete guide for the Proxmox API authentication
Examples
- name: Get prefer-pve-001 HA rule
community.proxmox.proxmox_cluster_ha_rules_info:
rule: prefer-pve-001
- name: List HA rules
community.proxmox.proxmox_cluster_ha_rules_info:
- name: List HA node-affinity rules
community.proxmox.proxmox_cluster_ha_rules_info:
type: node-affinity
- name: List HA resource-affinity rules
community.proxmox.proxmox_cluster_ha_rules_info:
type: resource-affinity
- name: List HA rules affected by a resource
community.proxmox.proxmox_cluster_ha_rules_info:
resource: vm:100
- name: List HA node-affinity rules affected by a resource
community.proxmox.proxmox_cluster_ha_rules_info:
type: node-affinity
resource: vm:100
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
HA rules Returned: on success |
|
The affinity type Returned: on success, when rule type is resource-affinity Sample: |
|
A comment associated with the rule. Returned: on success Sample: |
|
Whether the HA rule is disabled. Returned: on success Sample: |
|
A list of cluster node names and their priorities (if configured, otherwise only the node name is returned) Returned: on success, when rule type is node-affinity Sample: |
|
The rule position. Returned: on success Sample: |
|
A list of HA resource IDs that this rule applies to. Returned: on success Sample: |
|
The name of the HA rule. Returned: on success Sample: |
|
Whether the node affinity rule is strict. Returned: on success, when rule type is node-affinity Sample: |
|
The HA rule type Returned: on success Sample: |