community.general.proxmox_node_info (8.5.0) — module

Retrieve information about one or more Proxmox VE nodes

| "added in version" 8.2.0 of community.general"

Authors: John Berninger (@jwbernin)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

Retrieve information about one or more Proxmox VE nodes.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: List existing nodes
  community.general.proxmox_node_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: proxmox_nodes

Inputs

    
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

api_password:
    description:
    - Specify the password to authenticate with.
    - You can use E(PROXMOX_PASSWORD) environment variable.
    type: str

api_token_id:
    description:
    - Specify the token ID.
    - Requires C(proxmoxer>=1.1.0) to work.
    type: str
    version_added: 1.3.0
    version_added_collection: community.general

validate_certs:
    default: false
    description:
    - If V(false), SSL certificates will not be validated.
    - This should only be used on personally controlled sites using self-signed certificates.
    type: bool

api_token_secret:
    description:
    - Specify the token secret.
    - Requires C(proxmoxer>=1.1.0) to work.
    type: str
    version_added: 1.3.0
    version_added_collection: community.general

Outputs

proxmox_nodes:
  contains:
    cpu:
      description: Current CPU usage in fractional shares of this host's total available
        CPU.
      returned: on success
      type: float
    disk:
      description: Current local disk usage of this host.
      returned: on success
      type: int
    id:
      description: Identity of the node.
      returned: on success
      type: str
    level:
      description: Support level. Can be blank if not under a paid support contract.
      returned: on success
      type: str
    maxcpu:
      description: Total number of available CPUs on this host.
      returned: on success
      type: int
    maxdisk:
      description: Size of local disk in bytes.
      returned: on success
      type: int
    maxmem:
      description: Memory size in bytes.
      returned: on success
      type: int
    mem:
      description: Used memory in bytes.
      returned: on success
      type: int
    node:
      description: Short hostname of this node.
      returned: on success
      type: str
    ssl_fingerprint:
      description: SSL fingerprint of the node certificate.
      returned: on success
      type: str
    status:
      description: Node status.
      returned: on success
      type: str
    type:
      description: Object type being returned.
      returned: on success
      type: str
    uptime:
      description: Node uptime in seconds.
      returned: on success
      type: int
  description: List of Proxmox VE nodes.
  elements: dict
  returned: always, but can be empty
  type: list