To elaborate a bit further:

I've delved into puppet code and figured out that to enable such behaviour 
a single line needs to be changed, like this:

------------------------------------------------------------
--- puppet/settings.rb.DIST 2015-03-08 23:26:56.792628995 +0000
+++ puppet/settings.rb 2015-03-08 23:36:50.313658881 +0000
@@ -1263,7 +1263,7 @@
   # @api public
   class ChainedValues
     ENVIRONMENT_SETTING = "environment".freeze
-    ENVIRONMENT_INTERPOLATION_ALLOWED = ['config_version'].freeze
+    ENVIRONMENT_INTERPOLATION_ALLOWED = ['config_version', 'manifest', 
'modulepath'].freeze
 
     # @see Puppet::Settings.values
     # @api private
------------------------------------------------------------

I would like to address this question to more seasoned puppet developers:
Is there a reason interpolation is not enabled for these settings, some 
design-based reason?

Tnx,
b.


On Sunday, 8 March 2015 20:27:31 UTC+1, Bostjan Skufca wrote:
>
> Hi all,
>
> this change I have not yet implemented, but I believe it might be nice to 
> have.
>
> Currently in environment.conf we can specify modulepath with relative or 
> absolute paths to module directories, like this:
> modulepath = modules/:/some/other/location/env_name/
> manifest = /path/to/env_name/manifest2/
>
> It would be splendid if we could define modulepath paths with $environment 
> as variable part of path, like this:
> modulepath = /path/to/$environment/modules
> manifest = /path/to/$environment/manifest2/
>
> Would there be any interest for this feature?
> If this is implemented for modulepath setting, maybe it should be 
> appropriate to implement it for manifest setting too?
>
> b.
>
>
> PS: Explanation why I find this useful, or from which use case I derived 
> it would be useful:
> I have two puppets running on each system. Primary is for managing whole 
> system + secondary puppet, and secondary puppet is just for managing 
> primary puppet. This is useful for puppet upgrades - if something goes 
> wrong, secondary puppet still works and fixes primary puppet if required, 
> and vice versa.
> For these two I use the same module repository (each puppet has own module 
> though) and I find it convenient to not have to clone module repository for 
> the second time, for each environment.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/87c169ed-47e3-436e-bad5-eb3b8c6e84c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to