Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A yaml plugin for bolt inventory

License

EppO/puppetlabs-yaml

 
 

Repository files navigation

YAML Inventory

This module includes a yaml plugin for bolt. This allows you to compose multiple yaml files into a single bolt inventory file.

Usage

Resolve Reference

The resolve reference plugin can be used to load data from multiple files into a central bolt inventory file.

Parameters

  • filepath: The path to the yaml file. Relative paths are resolved in relation to the Bolt project directory

Examples

For example, to break the inventory file into multiple files based on groups.

---
# inventory.yaml
version: 2
groups:
  - _plugin: yaml
    filepath: inventory.d/first_group.yaml
  - _plugin: yaml
    filepath: invenotry.d/second_group.yaml
---
# inventory.d/first_group.yaml
name: first_group
targets:
  - one.example.com
  - two.example.com
---
# inventory.d/second_group.yaml
name: second_group
targets:
  - three.example.com
  - four.example.com

For example, to load user specific credentials into the inventory file.

---
# inventory.yaml
targets:
  - example.com
config:
  ssh:
    _plugin: yaml
    filepath: ~/.my_bolt_credentials.yaml
# ~/.my_bolt_credentials.yaml
user: me
password: hunter2

About

A yaml plugin for bolt inventory

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%