community.general.proxmox (1.3.11) — inventory

Proxmox inventory source

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

Authors: Jeffrey van Pelt (@Thulium-Drake) <jeff@vanpelt.one>

Install collection

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


Add to requirements.yml

  collections:
    - name: community.general
      version: 1.3.11

Description

Get inventory hosts from a Proxmox PVE cluster.

Uses a configuration file as an inventory source, it must end in C(.proxmox.yml) or C(.proxmox.yaml)

Will retrieve the first network interface with an IP for Proxmox nodes.

Can retrieve LXC/QEMU configuration as facts.


Requirements

Inputs

    
url:
    default: http://localhost:8006
    description: URL to Proxmox cluster.
    type: str

user:
    description: Proxmox authentication user.
    required: true
    type: str

cache:
    default: false
    description:
    - Toggle to enable/disable the caching of the inventory's source data, requires a
      cache plugin setup to work.
    env:
    - name: ANSIBLE_INVENTORY_CACHE
    ini:
    - key: cache
      section: inventory
    type: bool

plugin:
    choices:
    - community.general.proxmox
    description: The name of this plugin, it should always be set to C(community.general.proxmox)
      for this plugin to recognize it as it's own.
    required: true
    type: str

password:
    description: Proxmox authentication password.
    required: true
    type: str

want_facts:
    default: false
    description: Gather LXC/QEMU configuration facts.
    type: bool

cache_plugin:
    default: memory
    description:
    - Cache plugin to use for the inventory's source data.
    env:
    - name: ANSIBLE_CACHE_PLUGIN
    - name: ANSIBLE_INVENTORY_CACHE_PLUGIN
    ini:
    - key: fact_caching
      section: defaults
    - key: cache_plugin
      section: inventory
    type: str

cache_prefix:
    default: ansible_inventory_
    description:
    - Prefix to use for cache plugin files/tables
    env:
    - name: ANSIBLE_CACHE_PLUGIN_PREFIX
    - name: ANSIBLE_INVENTORY_CACHE_PLUGIN_PREFIX
    ini:
    - key: fact_caching_prefix
      section: defaults
    - key: cache_prefix
      section: inventory

facts_prefix:
    default: proxmox_
    description: Prefix to apply to LXC/QEMU config facts.
    type: str

group_prefix:
    default: proxmox_
    description: Prefix to apply to Proxmox groups.
    type: str

cache_timeout:
    default: 3600
    description:
    - Cache duration in seconds
    env:
    - name: ANSIBLE_CACHE_PLUGIN_TIMEOUT
    - name: ANSIBLE_INVENTORY_CACHE_TIMEOUT
    ini:
    - key: fact_caching_timeout
      section: defaults
    - key: cache_timeout
      section: inventory
    type: int

validate_certs:
    default: true
    description: Verify SSL certificate if using HTTPS.
    type: boolean

cache_connection:
    description:
    - Cache connection data or path, read cache plugin documentation for specifics.
    env:
    - name: ANSIBLE_CACHE_PLUGIN_CONNECTION
    - name: ANSIBLE_INVENTORY_CACHE_CONNECTION
    ini:
    - key: fact_caching_connection
      section: defaults
    - key: cache_connection
      section: inventory
    type: str