Hiera 3 + Puppet 4.2 can't manage empty value in yaml datasource -


i'm facing issues use hiera 3 puppet 4.2. when applying puppet manifest using command:

puppet apply environments/production/manifests/init.pp --hiera_config=hiera.yaml 

i following error:

error: evaluation error: error while evaluating function call, not find data item myclass::ensure in hiera data file , no default supplied @ /home/vagrant/temp/environments/production/manifests/init.pp:13:39 on node 

here directory structure :

$ tree . ├── environments │   └── production │       ├── config.yaml │       └── manifests │           └── init.pp └── hiera.yaml 

content of config.yaml:

$ cat hiera.yaml  --- :backends:   - yaml  :hierarchy:   - config  :yaml:   :datadir: environments/production 

content of init.pp:

class myclass(   $version                          = $myclass::params::version,   $ensure                           = $myclass::params::ensure, ) inherits myclass::params {    notify {"$version": }   notify {"$ensure": }  }  class myclass::params {   $version                          = hiera('myclass::version', '1.0.0')   $ensure                           = hiera('myclass::ensure', 'running') }  class {'myclass': } 

content of hiera data source:

$ cat config.yaml --- myclass::version: '1.0.0' myclass::ensure: 

looks hiera can't handle empty values yaml data source and/or replace them default value?


Comments

Popular posts from this blog

php - Admin SDK -- get information about the group -

dns - How To Use Custom Nameserver On Free Cloudflare? -

Python Error - TypeError: input expected at most 1 arguments, got 3 -