Skip to content

Configuring puppetdb as a hiera_backend #74

@divansantana

Description

@divansantana

One can configure puppetdb as a hiera_backend as per https://github.com/dalen/puppet-puppetdbquery#hiera-backend

However I'm not sure that it's currently possible to do this using this module as it expects a hash.

You'd expect this to work like so:

puppet::profile::master::hiera_backends:
  yaml:
    datadir: "/etc/puppet/environments/%{environment}/hiera"
  eyaml:
    datadir: "/etc/puppet/environments/%{environment}/hiera"
  puppetdb:

However breaks with:

Error: Failed to parse template puppet/hiera.yaml.erb:
  Filepath: /root/modules/puppet/templates/hiera.yaml.erb
  Line: 15
  Detail: undefined method `keys' for nil:NilClass
 at /root/modules/puppet/manifests/master/hiera.pp:22 on node node.example.co.za
Error: Failed to parse template puppet/hiera.yaml.erb:
  Filepath: /root/modules/puppet/templates/hiera.yaml.erb
  Line: 15
  Detail: undefined method `keys' for nil:NilClass
 at /root/modules/puppet/manifests/master/hiera.pp:22 on node node.example.co.za

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions