Konstantin Boyanov
2014-Apr-22 13:27 UTC
[Puppet Users] Error while passing multidimensional array to defined type
Hello, I am running into the following problem - I have a Puppet Module for managing SSH keys. The information about the keys is stored in Hiera in the following form: sshkeys_keys: - keyname: 'puppet_rootkey' key: 'adsfadsfadfadfadfasdfadfadf123123123123asdfasfasf123123123' keytype: 'ssh-rsa' keyuser: 'root' - keyname: 'puppet_rootkey2' key: 'qwerqwerqwerqwerqwer9878976qwerqwerqw9e876rqw9e87r6q9w8e7r6' keytype: 'ssh-dss' keyuser: 'root' etc... So, I want to create multiple ssh_authorized_keys resources and for that I use a defined type in my module class: define keyentry() { $keyname = $title['keyname'] $key = $title['key'] $keytype = $title['keytype'] $keyuser = $title['keyuser'] $ensure = $title['ensure'] ssh_authorized_keys { ensure=$ensure, key = $key, type = $type, user = $user } } $sshkeys_keys = hiera_array("sshkeys_keys") keyentry {"sshkeys_keys:} This gives me the following error and I cannot seem to understand why: *Error: Could not retrieve catalog from server: Could not intern from pson: Could not find relationship target "Sshkeys::keyentry[]"* Does anyone have some ideas what could be the problem, and how to get rid of it? Thanks in andvance! Cheers, Konstantin Boyanov -- 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+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/d6471316-d593-4f57-a8fb-cc2187e77562%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.