Forge Home

key_value_config

Manage configuration in remote key/value stores with puppet resources

11,024 downloads

10,225 latest version

4.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.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.2.3 (latest)
  • 0.2.2
  • 0.2.1
  • 0.2.0
  • 0.1.0
released Oct 11th 2014

Start using this module

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

Add this module to your Puppetfile:

mod 'garethr-key_value_config', '0.2.3'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add garethr-key_value_config
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install garethr-key_value_config --version 0.2.3

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

garethr/key_value_config — version 0.2.3 Oct 11th 2014

Maybe your configuration data isn't in files on disk, but in a new fancy distributed configuration store. But you still want to manage that configuration in code. Enter the key_value_config type for Puppet.

Puppet
Forge Build
Status

Usage

Currently this type has two providers for Etcd and Consul but writing other providers for Zookeeper or similar services should be trivial.

So setting a value for Etcd:

key_value_config { '/foo':
  ensure   => present,
  provider => etcd,
  value    => 'bar',
}

Or alternatvely for Consul:

key_value_config { '/foo':
  ensure   => present,
  provider => consul,
  value    => 'bar',
}

Configuration

By default the provider will try and talk with an Etcd node on localhost on port 4001. You can adjust this behaviour using environment variables, specifically: ETCD_HOST, ETCD_PORT, ETCD_USERNAME and ETCD_PASSWORD.

The Consul provider currently tries to access Consul on localhost:8500 and isn't configurable. This is because I couldn't find a configurable Consul client.

A note on error handling

There isn't any. If you don't pass workable keys and values then you'll likely get errors. I'll hopefully add sensible validation and remove this message in the future.