Re: [Puppet Users] A coding question about PE

2017-01-26 Thread Robert
Hi Peter,

On Thu, Jan 26, 2017 at 4:17 PM, Peter Berghold 
wrote:

> What I'd like to know is if there is a programatic way either in pure
> Puppet manifest code or through a custom function for a Puppet module to be
> "self aware" enough to know the full path of where it is installed?
>
> For instance if I put this module in the development environment I'd like
> it to know it should store files in /etc/puppetlabs/code/
> environments/development/modules//files.  In the UAT environment
> same thing only substitute "uat" for "developement" in the path.
>

you'll (probably) simply need dynamic environments. Read this:
http://garylarizza.com/blog/2014/02/18/puppet-workflow-part-3/

With dynamic environments, you can create multiple independent environments
based on the git branches of your git repos. Or at least use a $environment
variable-based path instead of a static one.

I hope that is at least approximately the answer for you question.


Hth,
Rp

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CANwwCtyZFsMT%3DrHLF8ddmH9%2BjgNrkV%3D%3DYZqBJ%2BTmnqzqbchEVw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] A coding question about PE

2017-01-26 Thread Peter Berghold
Hi there.  I find myself working for a company that is using PE and for the
last umteen years I've used the FOSS version.

That said I have a question that probably the answer to would apply to both
PE and FOSS.

I am creating a module for the sake of another module (if that makes sense)
that will self populate its files subdirectory with packages for
installation.  (puppetlabs-splunk)   What I'd like to know is if there is a
programatic way either in pure Puppet manifest code or through a custom
function for a Puppet module to be "self aware" enough to know the full
path of where it is installed?

For instance if I put this module in the development environment I'd like
it to know it should store files in
/etc/puppetlabs/code/environments/development/modules//files.  In
the UAT environment same thing only substitute "uat" for "developement" in
the path.

Gotta think there's a way to do this.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv19pPf4ewgQjzFLW%3DKKOYCxZ761HAdxN3mz63eBMknePQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.