On 12/16/2013 10:59 AM, jcbollinger wrote:
> 
> 
> On Friday, December 13, 2013 3:56:50 PM UTC-6, Joseph Swick wrote:
> 
> [...]
> 
> What am I missing to get Puppet to evaluate the $resourceX_type 
>> variables as a resource type [e.g: File, Service, etc.] to get this to 
>> work?
> 
> 
> 
> Puppet DSL does not provide such a feature.  It is conceivable -- likely, 
> even -- that you could instead create a custom function to apply generic 
> ordering constraints such as you want but you should beware that unlike 
> relationships declared via the DSL, relationships applied via a function 
> would probably be sensitive to manifest evaluation order.
> 
>  
>>>
> 
> I suspect that the use case for the functionality you describe is not 
> nearly so general as you suppose.  Module portability is more typically 
> approached in Puppet by using facts -- custom facts, if necessary -- to 
> probe the relevant characteristics of the target machine, and by using a 
> small number of higher-level alternatives to determine what to declare.  
> For example, it is common to use the $::osfamily fact to guide what 
> declarations to make, coding appropriate specifics for each supported OS 
> family.
> 
> 
> John
> 

Thank you for the reply.  However, I think you may not be fully
understanding what I was trying to describe (or I didn't describe it
well enough).  What I'm trying to do has nothing do do with resource
facts on the system within a module.  We're already using various facts
to define which portions of the hieradata should be considered for a
particular node.  I would like to ensure that the resources that get
defined as a result are created in the correct order when required.

Tl;dr;: I'm looking to see if I can achieve resource chaining wholly
within hiera definitions without having to create singular
manifests/classes for nodes to include via hiera, which the sole purpose
is to order resources that are being realized and configured via hiera.

It's quite likely what I'm trying to achieve isn't currently possible in
Puppet, but I was hoping that someone could point out something I
overlooked.  If not, I'll have to find an appropriate place in our
puppet site to create the resource ordering classes for various nodes
where the order of resource creation is critical.

Thank you.


-- 
Joseph Swick <joseph.sw...@meltwater.com>
Operations Engineer
Meltwater Group

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to