Good evening everyone, I'm having a problem while getting some information from a yaml file via hiera and I've been hours with it without knowing how to find the solution.
In the .pp I make the following lookup: files = hiera_hash('common::files', $files) In the hiera file I have an entry in the form: common::files: '/my/file': content: 'something simple' '/my/file2': content: 'something simple again' Then I get the following error: Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, Lookup of key 'common::files' failed: Value for key 'common::files', in hash returned from data_hash function 'yaml_data', when using location '/etc/puppetlabs/code/environments/my_env/hieradata/common.yaml', has wrong type, expects Puppet::LookupValue, got Hash[Data, Hash[Enum['content', 'ensure', 'target'], Enum['/opt/puppetlabs/bin/fact.-.... Just as if I couldn't get the value and I can't understand anything because it looks like a "internal" problem with gems and so on. I'm suspecting that because whenever I make a lookup in the server I get this error: # puppet lookup common::files Error: Could not run: wrong number of arguments (1 for 0) The global hiera.yaml file looks like this. It's almost a version: 5 defaults: datadir: "/etc/puppetlabs/code/environments/%{environment}/hieradata" data_hash: yaml_data # lookup_key: eyaml_lookup_key # options: # gpg_gnupghome: '/etc/puppetlabs/puppet/gpg_keys' # encrypt_method: 'gpg' hierarchy: - name: "common.yaml" data_hash: yaml_data path: "common.yaml" I'm moving from hiera v3 to hiera v5 and I was using GPG instead of PKCS7, but that will be another poblem. First of all I want to be able to recover the non-encrypted values. -- 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/3615bb0c-fb40-4fdb-bc02-d2beb9766b26%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.