I know some folks think this is heresy, but I personally dislike
defining each node in the default manifest.
I think it's better to drive as much data as possible from hiera as
possible, as such I do it more like this. I define a node definition
that does a hiera lookup to determine what role to apply and drive it
from there.
My current Puppet 5 implementation of this setup can be see here (yes,
this is my live configuration, yes I'm aware that seems horrible running
the whole thing out there like this :D )
Main puppet:
https://github.com/tykeal/puppetserver-v5-main
Hiera:
https://github.com/tykeal/puppetserver-v5-hiera (uses
hiera-eyaml-gpg for secrets management)
All profiles:
https://github.com/tykeal/puppetserver-v5-mod-profile
All roles:
https://github.com/tykeal/puppetserver-v5-mod-role
Mind you, I'm working on re-implementing a green field puppet 5 setup.
I've got a working puppet 4 one. All the same repos, just drop the -v5-
from the name.
Check the main repo Puppetfile for all forge / custom modules in play.
-Andy-
On 05/16/2018 02:51 AM, Arnau wrote:
> Hi,
>
> my opinion: create modules for everything, even if it's a single file
> copy. But create something that you can expand in the future.
>
> It's quite easy to create a puppet module
> (
http://fullstack-puppet-docs.readthedocs.io/en/latest/puppet_modules.html)
> so it will take you 5 minutes to write your own module(s).
>
> No matter how you start, working with modules is something that you'll
> thank in the future when you decide to add more stuff (code/hosts) to
> your puppet installation..
>
> Then, create a manifest.pp and configure your nodes like:
>
> node 'abc' {
> }
>
> node 'xyz' {
> }
>
> HTH,
> Arnau
>
> 2018-05-15 23:00 GMT+02:00 jeffster <
jol...@gmail.com
> <mailto:
jol...@gmail.com>>:
>
> Good day all,
>
> Newbie looking for some insight on how to organize manifests on
> puppet master. Simple setup with only a couple of machines to
> manage. One of my main sticking point is that according to the
> literature I've seen, they all seem to agree upon the fact that code
> must be organized using modules. My question is--If my setup is so
> simple, can I do without them? All I have are a few manifest files
> and templates.
>
> Secondly, should I go with the modules approach and divide my code
> in said modules, what happens when a portion of puppet code doesn't
> really fit logically into any of them? Would the code be kept at the
> site.pp level instead?
>
> Thank you
>
> jeff
>
> --
> 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...@googlegroups.com
> <mailto:
puppet-users...@googlegroups.com>.
> <
https://groups.google.com/d/msgid/puppet-users/bb6a05e9-fe38-4bdf-9a77-702cc8227824%40googlegroups.com?utm_medium=email&utm_source=footer>.
> <
https://groups.google.com/d/optout>.
>
>
> --
> 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...@googlegroups.com
> <mailto:
puppet-users...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/puppet-users/CAM69jx93Qgt4OShRycGzjibCv%2Bb%3DiNer3GAXrBhT5hWWb3vTyQ%40mail.gmail.com
> <
https://groups.google.com/d/msgid/puppet-users/CAM69jx93Qgt4OShRycGzjibCv%2Bb%3DiNer3GAXrBhT5hWWb3vTyQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.