Hi all,

I am using puppet in a 'standalone', or 'masterless' capacity to manage the 
configurations of different server roles. I'm doing this by using 'puppet 
apply' with a different environment depending on the situation. For example 
for local development:

puppet apply --modulepath=modules --hiera_config=environments/hiera.yaml --
environment=devLocal manifests/init.pp


I'm upgrading the infrastructure and am having trouble converting my 
workflow to the newer version. I have converted the hiera() function calls 
to lookup(), and have moved logic around in the hiera.yaml files so that 
now it should be processing the correct file when the command runs. 


However I currently get an error for each hiera variable, for example: "The 
Lookup Configuration at 
'/tmp/vagrant-puppet/environments/devLocal/hiera.yaml' has wrong type, 
unrecognized key 'server_role'"

The file itself (reduced for simplicity) looks as follows 
(environments/devLocal/hiera.yaml):


version: 5


server_role: "frontend"



The code in environments/hiera.yaml is as follows:

version: 5


defaults:
  datadir: "environments"
  data_hash: yaml_data


hierarchy:
  - name: "env"
    path: "%{environment}/hiera.yaml"




Does anyone have any suggestions on how I can make this work?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/5f5bb8a3-26e9-4386-a961-be02583a885fo%40googlegroups.com.

Reply via email to