Re: [Puppet Users] Need Ruby help for facts (inline_template) --> <%= classes.collect { |k, v| v }.sort.join(" ") %> --> empty

2017-04-18 Thread Denny Fuchs
hi, I've found the reason. The class profile::icinga2::agent must be loaded after all other classes. Than I get all classes from the node back. cu denny -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop

Re: [Puppet Users] Need Ruby help for facts (inline_template) --> <%= classes.collect { |k, v| v }.sort.join(" ") %> --> empty

2017-04-17 Thread Denny Fuchs
hi, what is very interesting: If I'm go back to my old vars=> hiera_hash('icinga_vars', {}), and adding to hieradata/common.yaml puppet_classes: "%{::classes}" than I get back all classes, but with the "[" "]" vars.puppet_classes = "["settings", "augeas::files"]

Re: [Puppet Users] Need Ruby help for facts (inline_template) --> <%= classes.collect { |k, v| v }.sort.join(" ") %> --> empty

2017-04-17 Thread Denny Fuchs
hi Derek, Am Montag, 17. April 2017 21:50:37 UTC+2 schrieb Derek Harkness: > > In your example it looks like classes is an array not a hash. Should be > able to just do classes.join(“ “). > > Derek > > I tried it, as the "module" example uses only .join. It works only for a few classes (13 i

Re: [Puppet Users] Need Ruby help for facts (inline_template) --> <%= classes.collect { |k, v| v }.sort.join(" ") %> --> empty

2017-04-17 Thread Derek Harkness
In your example it looks like classes is an array not a hash. Should be able to just do classes.join(“ “). Derek > On Apr 17, 2017, at 00:46, Denny Fuchs wrote: > > Hello, > > for my Icinga2, I want to add all classes to vars, like described in > https://goo.gl/z798HG (page 41). I added the

[Puppet Users] Need Ruby help for facts (inline_template) --> <%= classes.collect { |k, v| v }.sort.join(" ") %> --> empty

2017-04-17 Thread Denny Fuchs
Hello, for my Icinga2, I want to add all classes to vars, like described in https://goo.gl/z798HG (page 41). I added the sjoeboo/puppet-common module, which gives me all classes as a fact: facter -p classes ["settings", "host.foo.local", "base::root::password", "icinga2::params", "icinga2", ..