FAQ
I'm looking for a way to parameterize the module path at runtime based on multiple variables, including the environment. We've got a puppet master that serves nodes from several different projects, each of which have their own dev/test/prod environments. I'd like for each project to have their own entry in the module path. This way a project could have control over multiple modules and create new ones as they see fit, without impacting others who use the same puppetmaster. I'm envisioning something like

/etc/puppet/modules/common:/etc/puppet/modules/$project/$environment

where $project is a fact attached to the node that's checking into the master. This

Is this possible? Can arbitrary variables be used in the modulepath in puppet.conf?

Thanks,
Brian

--
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Jcbollinger at Jan 25, 2013 at 2:23 pm

    On Thursday, January 24, 2013 6:59:59 PM UTC-6, blalor wrote:
    I'm looking for a way to parameterize the module path at runtime based on
    multiple variables, including the environment. We've got a puppet master
    that serves nodes from several different projects, each of which have their
    own dev/test/prod environments. I'd like for each project to have their
    own entry in the module path. This way a project could have control over
    multiple modules and create new ones as they see fit, without impacting
    others who use the same puppetmaster. I'm envisioning something like

    /etc/puppet/modules/common:/etc/puppet/modules/$project/$environment


    where $project is a fact attached to the node that's checking into the
    master. This

    Is this possible? Can arbitrary variables be used in the modulepath in
    puppet.conf?
    I don't think it's possible, and if it were possible then I would account
    it very unwise. Part of the problem is that the Puppet agent syncs plugins
    before computing facts (required to support custom facts), and plugins
    typically reside in modules. Therefore, either the master must choose a
    module path without relying on node facts, or you risk the master using a
    different module path for pluginsync than for catalog compilation, so that
    clients may sync the wrong plugins.

    As I see it, your best options are these:

    1. Provide a separate master for each project.
    2. Allow projects to control modules only within a project-specific
    namespace (<project>::mymodule1, etc.), within each environment.

    Which of those makes more sense depends a lot on your objectives with each
    project.

    If they are intended ultimately to be deployed in the same site(s) and
    therefore to coexist, then it makes sense for them to share a master and
    dev / test / prod environments. If they don't, then you bear a substantial
    risk of target environment skew. If they share, however, then not only do
    you avoid skew, but you stand to identify integration issues a lot earlier
    than otherwise you might.

    If, on the other hand, it is not of particular concern whether the projects
    can coexist, then separate masters make a lot of sense.


    John

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedJan 25, '13 at 1:00a
activeJan 25, '13 at 2:23p
posts2
users2
websitepuppetlabs.com

2 users in discussion

Brian Lalor: 1 post Jcbollinger: 1 post

People

Translate

site design / logo © 2022 Grokbase