W3cubDocs

/Ansible 2.10

community.general.proxmox – Proxmox inventory source

Note

This plugin is part of the community.general collection.

To install it use: ansible-galaxy collection install community.general.

To use it in a playbook, specify: community.general.proxmox.

New in version 1.2.0: of community.general

Synopsis

  • Get inventory hosts from a Proxmox PVE cluster.
  • Uses a configuration file as an inventory source, it must end in .proxmox.yml or .proxmox.yaml
  • Will retrieve the first network interface with an IP for Proxmox nodes.
  • Can retrieve LXC/QEMU configuration as facts.

Requirements

The below requirements are needed on the local controller node that executes this inventory.

  • requests >= 1.1

Parameters

Parameter Choices/Defaults Configuration Comments
cache
boolean
    Choices:
  • no
  • yes
ini entries:

[inventory]
cache = no

env:ANSIBLE_INVENTORY_CACHE
Toggle to enable/disable the caching of the inventory's source data, requires a cache plugin setup to work.
cache_connection
string
ini entries:

[defaults]
fact_caching_connection = None

[inventory]
cache_connection = None

env:ANSIBLE_CACHE_PLUGIN_CONNECTION
env:ANSIBLE_INVENTORY_CACHE_CONNECTION
Cache connection data or path, read cache plugin documentation for specifics.
cache_plugin
string
Default:
"memory"
ini entries:

[defaults]
fact_caching = memory

[inventory]
cache_plugin = memory

env:ANSIBLE_CACHE_PLUGIN
env:ANSIBLE_INVENTORY_CACHE_PLUGIN
Cache plugin to use for the inventory's source data.
cache_prefix
string
Default:
"ansible_inventory_"
ini entries:

[default]
fact_caching_prefix = ansible_inventory_

[inventory]
cache_prefix = ansible_inventory_

env:ANSIBLE_CACHE_PLUGIN_PREFIX
env:ANSIBLE_INVENTORY_CACHE_PLUGIN_PREFIX
Prefix to use for cache plugin files/tables
cache_timeout
integer
Default:
3600
ini entries:

[defaults]
fact_caching_timeout = 3600

[inventory]
cache_timeout = 3600

env:ANSIBLE_CACHE_PLUGIN_TIMEOUT
env:ANSIBLE_INVENTORY_CACHE_TIMEOUT
Cache duration in seconds
facts_prefix
string
Default:
"proxmox_"
Prefix to apply to LXC/QEMU config facts.
group_prefix
string
Default:
"proxmox_"
Prefix to apply to Proxmox groups.
password
string / required
Proxmox authentication password.
plugin
string / required
    Choices:
  • community.general.proxmox
The name of this plugin, it should always be set to community.general.proxmox for this plugin to recognize it as it's own.
url
string
Default:
"http://localhost:8006"
URL to Proxmox cluster.
user
string / required
Proxmox authentication user.
validate_certs
boolean
    Choices:
  • no
  • yes
Verify SSL certificate if using HTTPS.
want_facts
boolean
    Choices:
  • no
  • yes
Gather LXC/QEMU configuration facts.

Examples

# my.proxmox.yml
plugin: community.general.proxmox
url: http://localhost:8006
user: ansible@pve
password: secure
validate_certs: no

Authors

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/community/general/proxmox_inventory.html