On Thursday, October 9, 2014 12:49:40 PM UTC-5, Tony Thayer wrote:
Couple of things I noticed:
Your testhiera/manifests/init.pp file looks a little odd. I re-wrote it a
bit and it ran without a hitch.
class testhiera {
$test = hiera('testhiera::test')
notice("Test is ${test}")
file { "/tmp/${test}" :
ensure => present,

But keep in mind that I am leaning entirely on hiera in my environment. My
site.pp file only contains hiera_include('classes') (and some other stuff to
omit .svn/.git directories from being backed up).
My personal take is that you should go all or nothing with it. That way you
aren't maintaining node definitions in site.pp AND in your node .yaml files.
- Tony
Thanks for the code fix! I would like to get to the point where all of the
data is in hiera. But I have a pretty big environment and unfortunately it
was one of those 'Boy, that escalated quickly' deals. It started off as
'Hey this puppet thing is cool!' and quickly tumbled into 5 sys-admins
hacking/patching code together for their servers. A few months ago I really
started to clean things up when I realized that an average puppet run was
about 10 minutes...I fixed a few big things and re-wrote one module so now
it is down to about 3 minutes but that is still far too long for what is
going on. The more I looked at that code the more I really began dreading
to look at the next module. Now that we have trimmed the number of OS's we
support to just CentOS 5&6, Scientific Linux 5&6, RHEL 6, and SLES11, there
is a /lot/ of dead puppet code for all the weird hacks we had to do. I want
to rip all of that out too!

The point being, I can't just flip a switch and use hiera off the bat. This
is going to be a tedious process as I switch out one module at a time with
a re-write. So I need to make sure I do this right and balance things
properly. This is also the biggest reason why I worry about a variable not
being found and Puppet silently carrying on without telling anyone that
there is a problem. The good thing is that I have a mostly-complete dev
virtual environment on my laptop, plus a much-closer-to-production dev
virtual environment at work, plus a good sampling of 'production boxes we
can afford to test on' (and I test code in that order). So by the time we
are ready to push to proper prod, things VERY rarely go completely sideways
on us.

I really like the idea of one place to control the specific variables
needed for a host and I /really/ like the idea of having our modules in
such a manner that we can just hand that code over to someone without
worrying about sensitive data in them (even if no one would ever use those
modules...a lot of them are very specific to our environment but I still
don't want that kind of information in them). So I think this is a good
goal for me to move forward to. It just will take some time. :-)


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/0ba936d6-dfed-4ba0-b8f6-7e2790975b26%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 12 of 16 | next ›
Discussion Overview
grouppuppet-users @
postedOct 8, '14 at 1:44p
activeOct 14, '14 at 7:50a



site design / logo © 2022 Grokbase