Jira (PUP-2782) Yumrepo target attribute does not work

2017-08-26 Thread Fabrice Bacchella (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Fabrice Bacchella commented on  PUP-2782 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: Yumrepo target attribute does not work  
 
 
 
 
 
 
 
 
 
 
If target don't work, please don't put it on the documentation. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 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-7882) lookup() function: set a kind of default value which is merged

2017-08-26 Thread Francois Lafont (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Francois Lafont updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-7882 
 
 
 
  lookup() function: set a kind of default value which is merged  
 
 
 
 
 
 
 
 
 

Change By:
 
 Francois Lafont 
 
 
 
 
 
 
 
 
 
 Hi,In brief, it will be convenient to be able to set a kind of default value in the {{lookup()}} function where this default value is merged with the "normal" value of the lookup. Now I try to give an example below to explain more precisely my idea.Suppose that I have a module {{mymod}} which has a parameter {{var}} which is a hash. Suppose that the default merge policy of this parameter {{mymod::var}} is {{deep}}. Now, I have a "role" class called {{myrole}} which inlcudes the class {{mymod}}. In this role, I need to set the {{var}} parameter to a specific value. So, for instance, in my hierarchy, I can set this in the file {{fqdn/$fqdn.yaml}}:{code:yaml}---mymod::var: { ... a specific value... }{code}With the 'deep' merge policy, I have *easily* and *exactly* the value I want for my role.But the problem is: this specific and final value of {{mymod::var}} is *intrinsic to my role*. I don't want the "hiera user" to be able to change this value in my role class because, if it is set to another value, my role has no meaning.So I would like to set this value directly in the body of my role class with something like that (the code is not currently valid of course because the feature doesn't exist yet):{code:puppet}class myrole {  $options = {'default_merged_value' =>  { ... a specific value... },  }  $specific_value_for_this_role = lookup('mymod::var', $options)  class {'mymod':var => $specific_value_for_this_role,   } }{code}Of course, this lookup option {{default_merged_value}} currently doesn't exist. The idea is:1. the {{lookup()}} makes its normal job of lookup...2. ... except that the {{default_merged_value}} is merged too in the lookup according to the current merge policy.I hope I'm clear...Maybe my request is not relevant (I don't think so but maybe I'm wrong), maybe it's not desirable, or maybe it is not easy to implement etc. Anyway, feel free to close this ticket if needed.Thanks for reading me. :) PS: edit typo 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 

Jira (PUP-7882) lookup() function: set a kind of default value which is merged

2017-08-26 Thread Francois Lafont (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Francois Lafont created an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-7882 
 
 
 
  lookup() function: set a kind of default value which is merged  
 
 
 
 
 
 
 
 
 

Issue Type:
 
  New Feature 
 
 
 

Assignee:
 

 Unassigned 
 
 
 

Components:
 

 AIO 
 
 
 

Created:
 

 2017/08/26 6:05 AM 
 
 
 

Priority:
 
  Normal 
 
 
 

Reporter:
 
 Francois Lafont 
 
 
 
 
 
 
 
 
 
 
Hi, 
In brief, it will be convenient to be able to set a kind of default value in the lookup() function where this default value is merged with the "normal" value of the lookup. Now I try to give an example below to explain more precisely my idea. 
Suppose that I have a module mymod which has a parameter var which is a hash. Suppose that the default merge policy of this parameter mymod::var is deep. Now, I have a "role" class called myrole which inlcudes the class mymod. In this role, I need to set the var parameter to a specific value. So, for instance, in my hierarchy, I can set this in the file fqdn/$fqdn.yaml: 
 
 
 
 
 
 
--- 
 
 
 
 
mymod::var: { ... a