> It's not entirely clear to me why you want to manage the contents of a 
> Mantis database as system *configuration*, but Puppet is flexible enough to 
> do it.
>
> Managing database content this way seems in Puppet range (such as with 
*macauthorization)*. 
We also need MantisBT to be ready with pre-defined projects and users as 
some external components may have to generate issues, it thus become part 
of our environment configuration requirements. 

Your problem springs largely from the fact that your parent / child 
> relationships have more state than just their presence or absence.  You 
> need a way to convey that state.  You already know that you can do it via 
> separate resources.  If you want to do it all within the Project resource, 
> then you'll need to use one or more attributes with complex data type.  
> There are all manner of specific ways you could go here, including the one 
> you proposed, but I would advise you to have children declare who their 
> parents are, instead of having parents declare who their children are.  For 
> example, you might support a form like this:
>
> project { 'C':
>   ensure => present,
>   parent => { 'A' => { 'inherit' => true }, 'B' => { 'inherit' => false } 
> }
> }
>
>
> As for validating the contents of the hash-valued attributes, that's just 
> par for the course.  With more complex data comes more complex requirements 
> for validation.  Use the validation hook in your custom type to engage 
> whatever validation is appropriate.
>

Your explanation is quite clear, I'll probably use something like this. 
Thanks!
 

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/5064d3d1-8a26-4eca-b5ab-9ee53b30ade6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to