Jira (PUP-4806) Add a variable with the chosen environmentpath

2018-03-16 Thread Josh Cooper (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Josh Cooper updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-4806  
 
 
  Add a variable with the chosen environmentpath   
 

  
 
 
 
 

 
Change By: 
 Josh Cooper  
 
 
Sub-team: 
 Coremunity  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-4806) Add a variable with the chosen environmentpath

2017-05-18 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-4806 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: Add a variable with the chosen environmentpath  
 
 
 
 
 
 
 
 
 
 
Note to implementor - it is now easy to add namespaced variables for things like $serverfacts:: namespace as all qualified entries are in one and the same place. No need to jump through the hoops of having a strange "class" holding parameters and linking to a scope to make this work. See 

PUP-5635
. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-4806) Add a variable with the chosen environmentpath

2017-05-17 Thread John Duarte (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 John Duarte updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-4806 
 
 
 
  Add a variable with the chosen environmentpath  
 
 
 
 
 
 
 
 
 

Change By:
 
 John Duarte 
 
 
 

Labels:
 
 triaged 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-4806) Add a variable with the chosen environmentpath

2017-05-17 Thread Sean Millichamp (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Sean Millichamp commented on  PUP-4806 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: Add a variable with the chosen environmentpath  
 
 
 
 
 
 
 
 
 
 
I had opened the now closed-as-duplicate 

PUP-3041
 requesting the same thing. I also have some code which tries to ascertain which of multiple different path entries in environmentpath the currently compiling environment ended up coming from. Just a suggestion that perhaps having a name of environmentdir as an exposed value when there is already a Puppet setting called environmentpath might be a touch confusing. Maybe call it something like current_environment_dir ? For as little as it is likely to be used in code it might make sense to be a bit wordier for clarity. Otherwise, sounds good. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-4806) Add a variable with the chosen environmentpath

2015-07-03 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-4806 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: Add a variable with the chosen environmentpath  
 
 
 
 
 
 
 
 
 
 
Ah, What we could do is add the path of the environment directory to $server_facts. That can be added without requiring a major release (since adding a new global variable is not backwards compatible). How about using environment_dir or environmentdir. 
You need to run with --trusted_server_facts option turned on (it is recommended anyway to be sure you pick up environment, certname, etc. in a way that cannot be manipulated by logic in the manifests; i.e. $server_facts['environment']. Which you can get by using server_facts.environment in hiera). 
Ping Eric Sorenson - does that sound like a good idea? 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-4806) Add a variable with the chosen environmentpath

2015-07-03 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg assigned an issue to Eric Sorenson 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-4806 
 
 
 
  Add a variable with the chosen environmentpath  
 
 
 
 
 
 
 
 
 

Change By:
 
 Henrik Lindberg 
 
 
 

Assignee:
 
 Eric Sorenson 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-4806) Add a variable with the chosen environmentpath

2015-07-03 Thread Reinhard Vicinus (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Reinhard Vicinus commented on  PUP-4806 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: Add a variable with the chosen environmentpath  
 
 
 
 
 
 
 
 
 
 
I think you misunderstood my intention or I wasn't clear enough. So let me explain further what I do and how I think this feature would improve puppet. I have different hierdata for every environment. To do this I had configured in the hiera.yaml: 
:datadir: "/etc/puppet/environments/%{::environment}/hieradata 
Now for some reasons I'm forced to use different environment locations with the environmentpath configuration value in puppet.conf and the above isn't working anymore. But I'm able to do it with some not so clean configuration still: 
In the manifests of every environment i define (exists is a ruby function which checks if a file exists on the puppet master): 
if exists("/etc/puppet/environmentpath1/$environment)  { $environmentpath = "/etc/puppet/environmentpath1" } 
 elsif exists("/etc/puppet/environmentpath2/$environment)  { $environmentpath = "/etc/puppet/environmentpath2" } 
 else  { $environmentpath = "/etc/puppet/environments" } 
and in the hiera.yaml: 
:datadir: "%{::environmentpath}/%{::environment}/hieradata 
It certainly works but it's a pain in the ass and it would be a lot cleaner if a puppet run knew which environment path was used instead to have to determine it. Also it would be needed in the environment.conf, because in the past I was able to use: 
config_version = /usr/bin/git --git-dir /etc/puppet/environments/$environment/.git describe --long --all 
now I'm forced to use a shell script to replicate the same environment path determination as is done in the manifests file. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c) 
 
 
 
 
  
 
 
 
 
 
 
 
 
 

Jira (PUP-4806) Add a variable with the chosen environmentpath

2015-07-02 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-4806 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: Add a variable with the chosen environmentpath  
 
 
 
 
 
 
 
 
 
 
Sorry, but that is not possible, a hiera configuration works across all environments, and only you know what works across all of them. There is no such thing as a "top scope that spans all possible environments". While it would be possible to make it possible to retrieve the effective environment directory it is too late as the hiera configuration has already been established. 
Adding new top scope variables is also an anti-pattern. 
This is not something that we are going to change for hiera as such. Instead, the solution is the support for "data in modules" which will make it possible to define hiera data in modules and environments. See PUP-4474. 
Closing this as a 'won't fix' 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.3.15#6346-sha1:dbc023d) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-4806) Add a variable with the chosen environmentpath

2015-07-01 Thread Reinhard Vicinus (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Reinhard Vicinus created an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-4806 
 
 
 
  Add a variable with the chosen environmentpath  
 
 
 
 
 
 
 
 
 

Issue Type:
 
  New Feature 
 
 
 

Affects Versions:
 

 PUP 3.8.1 
 
 
 

Assignee:
 

 Unassigned 
 
 
 

Created:
 

 2015/07/01 1:55 AM 
 
 
 

Priority:
 
  Normal 
 
 
 

Reporter:
 
 Reinhard Vicinus 
 
 
 
 
 
 
 
 
 
 
It's possible to define multiple paths in the environmentpath configuration value, where puppet looks for environments. But afterwards during a puppet run, it isn't possible to determine easily which path was chosen. But there are at least two occurrences where the absolute path to a environment is needed: 1.) Configure hiera datadir per environment 2.) Configure config_version per environment 
I would suggest, that a variable is added to the top scope which contains the chosen path to the environment from the environmentpath configuration value and is also useable in the per environment environment.conf. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment