Version information
released Jan 23rd 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
Add this module to your Puppetfile:
mod 'h0tw1r3-incus_inventory', '0.1.0'
Learn more about managing modules with a PuppetfileDocumentation
h0tw1r3/incus_inventory — version 0.1.0 Jan 23rd 2024
Incus and LXD inventory for Bolt
Table of Contents
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
Reference
Table of Contents
Tasks
resolve_reference
: Generate targets from Incus or LXD
Tasks
resolve_reference
Generate targets from Incus or LXD
Supports noop? false
Parameters
provider
Data type: Optional[Enum['incus', 'lxd']]
which service to use, prefers incus if unset
remote
Data type: Optional[String]
name of remote in configuration
filter
Data type: Optional[String]
instances collection filter passed directly to api call
project
Data type: Optional[String]
limit instances to specific project
all_projects
Data type: Boolean
query all projects
target_mapping
Data type: Hash
target attributes to populate with resource values
Dependencies
- puppetlabs-ruby_plugin_helper (>= 0.1.0 < 1.0.0)
- puppetlabs-ruby_task_helper (>= 0.4.0 < 1.0.0)
MIT License Copyright (c) 2022 Jeffrey Clark Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.