Hey Pete,

Thanks for the info.  I think adding a class and "futureproofing" for 
things like dependencies is probably the way to go, in this specific 
scenario.  

Many thanks for the link and for the great information below.  I owe you a 
beer.

Cheers,

Mike


On Thursday, January 23, 2014 12:29:19 AM UTC-8, Peter Meier wrote:
>
> -----BEGIN PGP SIGNED MESSAGE----- 
> Hash: SHA1 
>
> Hi 
>
> > Per the snippet above, I'm simply trying to add in an extra entry 
> > into my /etc/apt/sources.list but I'm not sure where I would 
> > actually put the above piece of code.  I currently have it sitting 
> > in my init.pp file for the corresponding class but I'm not sure if 
> > that's really where it belongs. 
> > 
> > Is the init.pp file the right place for this and if not, where 
> > would I put it? 
> > 
> > My apologies if this is a stupid question as I'm having a hard 
> > time wrapping my head around this one. 
>
> The answer totally depends on how you would like to structure your 
> modules. 
>
> Given that you are managing apt-stuff I would assume that you have 
> something like an apt-module and I would place it within there. 
>
> You could place it there in the init.pp in the apt-class and on all 
> your debian systems, you would do an "include apt". However you might 
> not want this repository to be present on all nodes, actually only on 
> the ones that need the client-repo. 
> So then a class called apt::repos::client (in the apt-modules in 
> manifests/repos/client.pp ) might be the better place to put it and 
> include this class on all nodes that require this repository. 
>
> This has even a different advantage: Maybe the main purpose for this 
> repository is have the packages available to install certain 
> applications - that you are also managing by puppet. So you could 
> include this repo-class only in the classes that manage the packages 
> for these applications (specify a dependency!) and you have not 
> anymore to think about this apt-dependency if you apply a certain 
> application-class to a node. 
>
> But this might already be a little bit off-the-topic. Anyway 
> http://www.slideshare.net/PuppetLabs/roles-talk<http://www.google.com/url?q=http%3A%2F%2Fwww.slideshare.net%2FPuppetLabs%2Froles-talk&sa=D&sntz=1&usg=AFQjCNHolEfAxdV3LspVmzjuAEgtIJLqHA>is
>  really a good 
> practice to structure your puppet code. 
>
> ~pete 
> -----BEGIN PGP SIGNATURE----- 
> Version: GnuPG v1 
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ 
>
> iEYEARECAAYFAlLg0tkACgkQbwltcAfKi3+YzACfSSsiJpa0nr9/XvpNjRNtIS1L 
> RXwAn3UPFCCJVC4F3twiozCGNqI4PAoI 
> =I0Xj 
> -----END PGP SIGNATURE-----   
>

-- 
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/7eaf0b77-9fd6-41c0-a5dd-d42119edb21b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to