Location of config files in roles/profiles pattern

170 views
Skip to first unread message

J.T. Conklin

unread,
Jun 17, 2017, 2:41:35 PM6/17/17
to puppet...@googlegroups.com

Over the past year or so, we've completed a transition from locally
developed puppet modules containing node-specific configuration, to
using the roles/profiles pattern with parameterized modules with most
config values coming from hiera.

One exception to this are config files that are too specific, to
complicated, or otherwise not suitable for conversion to templates. At
the moment, these are still in our puppet modules. Not only does this
bind node-specific configuration in with otherwise independent modules,
now that all our other node-specific configuration is done with hiera,
the config is split across two places -- which makes it hard to under-
stand.

I spent some time look for articles and blog posts that cover this, but
all the examples I've seen show use cases where module configuration is
completely taken from hiera. How do others handle this? Store files in
the profiles module itself?

Thanks in advance,

--jtc

Rob Nelson

unread,
Jun 17, 2017, 7:07:11 PM6/17/17
to puppet...@googlegroups.com
Jtc,

I keep my templates and files in the profile class itself, in paths like files/phpMyAdmin/config.php and templates/randomapp/app.conf.erb. I have a site_config module that has some files that aren't tied to profile development, like certs. Other than that, I DO put config files in the 2 component modules that are private (everything else is from the forge). 

I hope that gives you some ideas. 

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/87a856sbhk.fsf%40wopr.acorntoolworks.com.
For more options, visit https://groups.google.com/d/optout.
--
Rob Nelson

Garrett Honeycutt

unread,
Jun 18, 2017, 1:34:13 PM6/18/17
to puppet...@googlegroups.com
> <mailto:puppet-users%2Bunsu...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/87a856sbhk.fsf%40wopr.acorntoolworks.com.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> Rob Nelson
>

Hi,

I do something similar by keeping files and templates in profiles module
and encode the name of the profile into the path.

So for profile 'foo' I might have profile/templates/foo/ and
profile/files/foo/ that would each contains templates and files,
respectively.

Best regards,
-g

--
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile: +1.206.414.8658

Angel L. Mateo

unread,
Jun 19, 2017, 2:46:26 AM6/19/17
to puppet...@googlegroups.com
>
> I do something similar by keeping files and templates in profiles module
> and encode the name of the profile into the path.
>
> So for profile 'foo' I might have profile/templates/foo/ and
> profile/files/foo/ that would each contains templates and files,
> respectively.
>
I do it like Garret too.

--
Angel L. Mateo Martínez
Sección de Telemática
Área de Tecnologías de la Información
y las Comunicaciones Aplicadas (ATICA)
http://www.um.es/atica
Tfo: 868889150
Fax: 868888337

Andrew Grimberg

unread,
Jun 19, 2017, 11:20:28 AM6/19/17
to puppet...@googlegroups.com

-------- Forwarded Message --------
Subject: Re: [Puppet Users] Location of config files in roles/profiles
pattern
Date: Mon, 19 Jun 2017 08:46:14 +0200
From: Angel L. Mateo <ama...@um.es>
Reply-To: puppet...@googlegroups.com
To: puppet...@googlegroups.com

>
> I do something similar by keeping files and templates in profiles module
> and encode the name of the profile into the path.
>
> So for profile 'foo' I might have profile/templates/foo/ and
> profile/files/foo/ that would each contains templates and files,
> respectively.
>
I do it like Garret too.

This is the method that I follow for my personal Puppet setup as well as
what we do at work.

-Andy-

--
Angel L. Mateo Martínez
Sección de Telemática
Área de Tecnologías de la Información
y las Comunicaciones Aplicadas (ATICA)
http://www.um.es/atica
Tfo: 868889150
Fax: 868888337

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/c7f65fec-cb3f-2804-3f29-1133b69a14aa%40um.es.
signature.asc
Reply all
Reply to author
Forward
0 new messages