Re: [Puppet Users] Help with Multiple Resource Declarations

2019-05-03 Thread Stephen Marlow
Hey Dan, The error you're getting is just saying that you've declared the Base::Systemusers class twice and a class can only be declared once. I suspect that your code looks something like this: $systemusers = lookup({ name => 'base::systemusers' }) $systemusers.each |$username,

Re: [Puppet Users] reduce function doesn't return results from single iteration

2019-02-09 Thread Stephen Marlow
Hey Dan, In each iteration of the reduce function the memo value is replaced by the result value of the block. The final return value of reduce is the result of the last iteration of the block. The result of the block is the value of the last statement executed. Your block has two possible

Re: [Puppet Users] Re: ok.. I am going crazy,,

2015-05-14 Thread Stephen Marlow
For what it's worth, variables with a value of undef will be nil in templates. You can use the .nil? method to check them, so you don't need to make a test variable there. Additionally, you should refer to variables in templates with an @, such as @gemfire_users instead of gemfire_users. Here's a

Re: [Puppet Users] Is there a web interface for monitoring and managing puppet?

2015-02-06 Thread Stephen Marlow
Hey Bryan, There are several web interfaces available for Puppet with different sorts of functionality. I personally like Puppetboard ( https://github.com/puppet-community/puppetboard). It's a nice web interface for monitoring node activity. If that's not quite what you're looking for, there are

Re: [Puppet Users] Puppet hangs when hiera data uses hiera lookup

2015-01-13 Thread Stephen Marlow
I can't say I've ever seen nested hiera lookups, and I don't know if they're supported. If these values are all in the same yaml file you might have better luck using anchors and references ( https://en.wikipedia.org/wiki/YAML#Repeated_nodes). I think it would work for all of the above entries

Re: [Puppet Users] Concatinating hashes

2015-01-09 Thread Stephen Marlow
You could likely use iteration in the future parser or recursion to build up the string, but what sits in my mind as the path of least resistance is inline templating (c.f. https://docs.puppetlabs.com/references/latest/function.html#inlinetemplate). I ran a quick test along these lines and it

Re: [Puppet Users] Concatinating hashes

2015-01-09 Thread Stephen Marlow
at 11:00 AM, Stephen Marlow tega...@gmail.com wrote: You could likely use iteration in the future parser or recursion to build up the string, but what sits in my mind as the path of least resistance is inline templating (c.f. https://docs.puppetlabs.com/references/latest/function.html

Re: [Puppet Users] How to test hiera info?

2015-01-06 Thread Stephen Marlow
You can use hiera on the command line to directly look up values, and you can feed it a file to use different facts. On the client: sudo facter -p -y facts.yml This tells facter to gather facts, using additional puppet facts (-p) and to output them in a yaml format (-y). In my instance I had

Re: [Puppet Users] dynamically named variables?

2014-12-15 Thread Stephen Marlow
I would personally take the route of explicitly looking up the hiera data, along these lines: class foo ($app_user = 'bar') { $dir = hiera(${app_user}::etc_dir) file { /etc/${dir}: ... } } On Mon, Dec 15, 2014 at 1:24 PM, Dan White d_e_wh...@icloud.com wrote: It may take a step in

Re: [Puppet Users] Re: Puppet Error

2014-10-08 Thread Stephen Marlow
It appears to be interpreting params::sshd_service as a literal. Have you tried prefixing it with a $ or fully qualifying it, e.g. $ puppet-ssh::params::sshd_service? On Wed, Oct 8, 2014 at 3:20 PM, Juan Andres Ramirez jandresa...@gmail.com wrote: Maybe?? service { 'sshd': ensure=