Skip to content

h0tw1r3/puppet-incus_inventory

Repository files navigation

Incus and LXD inventory for Bolt

Table of Contents

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

Description

A Bolt plugin for dynamically generating targets for instances managed by Incus or LXD.

Requirements

  • A working client configuration with at least one remote. Does not require the client, REST API calls are made directly.

If the command incus list or lxd list works, this plugin should too.

Usage

Inventory task parameters:

parameter type description default
all_projects Boolean query all projects false
filter Optional[String] instances collection filter passed directly to api call
project Optional[String] limit instances to specific project
provider Optional[Enum['incus', 'lxd']] which service to use, prefers incus if unset
remote Optional[String] name of remote in configuration
target_mapping Hash hash of target attributes to populate with resource values { name: name }

Examples

groups:
  - name: containers on dc1 remote
    targets:
      - _plugin: incus_inventory
        remote: dc1
        filter: type eq container
  - name: vms on default remote
    targets:
      - _plugin: incus_inventory
        filter: type eq virtual-machine
        target_mapping:
          name: name
          alias: state.network.nic0.addresses.0.address
          vars:
            arch: architecture
  - name: all debian instances
    targets:
      - _plugin: incus_inventory
        filter: config.image.os eq Debian

About

A Puppet Bolt task to generate inventory from Incus or LXD

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages