Hi, I''m trying to do the following: import ssh public keys using a custom function which reads the keys from somewhere. So far, everything works, and I can create entires using the native sshkey method and my custom function. However, my problem is that, each key is associated with multiple values - e.g. hostname, alias, key type and key value. What currently I do, I run each time my function with a parameter asking which type of value to return (e.g. all hosts, host key type, host key value etc), which results in multiple runs of the same script querying more or less the same entries for different values, with 100 entires, it will make 301 runs of the function. is there any other better way to return multiple values from the same script and parse it some how? Thanks, Ohad --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Ohad Levy
2008-Aug-03 07:31 UTC
[Puppet Users] Re: can a custom fact return multiple values?
Hmm.. Sorry wrong title, custom function not a fact... On Sun, Aug 3, 2008 at 3:30 PM, Ohad Levy <ohadlevy@gmail.com> wrote:> Hi, > > I''m trying to do the following: > import ssh public keys using a custom function which reads the keys > from somewhere. > > So far, everything works, and I can create entires using the native > sshkey method and my custom function. > > However, my problem is that, each key is associated with multiple > values - e.g. hostname, alias, key type and key value. > > What currently I do, I run each time my function with a parameter > asking which type of value to return (e.g. all hosts, host key type, > host key value etc), which results in multiple runs of the same script > querying more or less the same entries for different values, with 100 > entires, it will make 301 runs of the function. > > is there any other better way to return multiple values from the same > script and parse it some how? > > Thanks, > Ohad >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---