Forge Home

proxmox_inventory

A task to generate Bolt inventory from Promxox

2,309 downloads

113 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.7.1 (latest)
  • 0.7.0
  • 0.6.2
  • 0.6.1
  • 0.6.0
  • 0.5.0
  • 0.4.0
  • 0.3.0
  • 0.2.8
  • 0.2.7
  • 0.2.6
  • 0.2.5
  • 0.2.4
  • 0.2.3 (deleted)
  • 0.2.2 (deleted)
  • 0.2.1
  • 0.2.0
  • 0.1.0
released Apr 1st 2024
This version is compatible with:
  • Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
  • Puppet >= 7.0.0 < 9.0.0
  • , , , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'h0tw1r3-proxmox_inventory', '0.7.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add h0tw1r3-proxmox_inventory
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install h0tw1r3-proxmox_inventory --version 0.7.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

h0tw1r3/proxmox_inventory — version 0.7.1 Apr 1st 2024

proxmox_inventory

Table of Contents

  1. Description
  2. Requirements
  3. Usage
  4. Examples

Description

This module includes a Bolt plugin to generate targets from Proxmox VE.

Requirements

This Bolt plugin requires the proxmox-api gem to connect to the Proxmox REST API. If it is not installed, the plugin will automatically attempt to when the plugin is executed by Bolt.

You will need a token and secret, or username, password and realm to authenticate.

Usage

The Proxmox inventory plugin supports looking up running LXC and QEMU VMs. It supports several configuration properties.

  • username: Do not set if using a token
  • password: Do not set if using a token
  • realm: Do not set if using a token
  • token: Complete API token (eg. admin@pve!puppetbolt)
  • secret: Token secret
  • host: Hostname of the Proxmox node (any cluster member)
  • port: API port (optional)
  • verify_ssl: Set to false if using a self-signed certificate
  • type: Filter on VM type, qemu or lxc (optional, default 'all')
  • target_mapping: A hash of the target attributes to populate with resource values. Proxmox cluster/resources and node configuration attributes are available for mapping. Network interface (eg. net0, net1, ...) string value is converted to a Hash. Default mapping: name: fqdn alias: name uri: net0.ip

Examples

groups:
  - name: lxc proxmox containers at dc1
    targets:
      - _plugin: proxmox_inventory
        host: dc1.bogus.site
        username: admin
        password: supersecret
        realm: pve
        type: lxc
        target_mapping:
          name: fqdn
          uri: net0.ip
          alias: name
          vars:
            arch: arch
            type: type
  - name: all proxmox VMs at dc2
    targets:
      - _plugin: proxmox_inventory
        host: dc2.another.site
        token: admin@pve!bolt
        secret: 095ce810-4e28-11ed-bdc3-0242ac120002
        target_mapping:
          alias: vmid

Qemu: the agent service must be running on the VM to determine the IP address