Skip to content

Add Ansible info module for Proxmox cluster status and quorum #237

@michaelwdombek

Description

@michaelwdombek
SUMMARY

Add a read-only info module to retrieve Proxmox cluster status information via the API, including cluster nodes, quorum state, and cluster configuration details.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

community.proxmox.proxmox_cluster_status_info

ADDITIONAL INFORMATION

Currently there is no supported way in the community Proxmox modules to retrieve the overall cluster status, such as the list of nodes in a cluster or whether the cluster is quorate. This information is available via the Proxmox API endpoint GET /cluster/status, but cannot be consumed easily in Ansible workflows.

This creates gaps in automation, especially for:

  • validating cluster health and quorum state,
  • cluster creation and bootstrap workflows where cluster_join_info is insufficient,
  • conditional logic depending on node availability.
- name: Get cluster status
  community.proxmox.proxmox_cluster_status_info:
    api_host: proxmox1
    api_user: root@pam
    api_password: "{{ password | default(omit) }}"
    api_token_id: "{{ token_id | default(omit) }}"
    api_token_secret: "{{ token_secret | default(omit) }}"
  register: cluster_status

- name: Display cluster quorum status
  ansible.builtin.debug:
    msg: "Cluster has quorum: {{
      cluster_status.cluster_status
      | selectattr('type', 'equalto', 'cluster')
      | map(attribute='quorate')
      | first
    }}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions