Skip to content
This repository has been archived by the owner on Jun 11, 2023. It is now read-only.

mmickan/hiera-consul

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

consul is an orchestration mechanism with fault-tolerance based on the gossip protocol and a key/value store that is strongly consistent. Hiera-consul is a backend for Hiera using Consul as its data source.

Configuration

The following hiera.yaml should get you started:

:backends:
  - consul

:consul:
  :paths:
    - kv/configuration/%{fqdn}
    - kv/configuration/common

Extra parameters

The following parameters are also valid and available:

:consul:
  :host: 127.0.0.1
  :port: 8500
  :protocol: 1
  :failure: consistent
  :ignore_absent: true
  :use_ssl: false
  :ssl_verify: false
  :ssl_cert: /path/to/cert
  :ssl_key: /path/to/key
  :ssl_ca_cert: /path/to/ca/cert

Query the catalog

You can also query the Consul catalog for values by adding catalog resources in your paths, the values will be returned as an array so you will need to parse accordingly. Note that hiera_hash is not supported with Consul's catalog endpoint.

:backends:
  - consul

:consul:
  :paths:
    - kv/configuration/%{fqdn}
    - kv/configuration/common
    - catalog/service
    - catalog/node

Thanks

Thanks to @lynxman, @garethr and @crayfishx, as well as @puppetlabs for the projects this draws from:

Thanks also to @mitchellh for writing such wonderful tools and the API Documentation

About

Hiera backend plugin for Consul

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 95.7%
  • Puppet 4.3%