Hi all Whats the best way of depending on a module - for example, I have an lvm and a mysql module - on booting a clean machine it''s important that lvm be set up before the mysql rpm installs as I want mysql on a volume. I can''t see an easy (clean) way of making sure the mysql module installs after the lvm module apart from depending on some resource that the lvm module creates, which seems a bit dirty. Is there a better way of doing this? Cheers Craig --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Craig Dunn wrote:> > Hi all > > Whats the best way of depending on a module - for example, I have an lvm > and a mysql module - on booting a clean machine it''s important that lvm > be set up before the mysql rpm installs as I want mysql on a volume. I > can''t see an easy (clean) way of making sure the mysql module installs > after the lvm module apart from depending on some resource that the lvm > module creates, which seems a bit dirty. > > Is there a better way of doing this?Have a resource in one module depend on on a class in the module. There isn''t a way of directly making on module dependent on another module. There was a long thread of this last week or the week before that might have food for thought. Regards James Turnbull - -- Author of: * Pulling Strings with Puppet (http://www.amazon.com/gp/product/1590599780/) * Pro Nagios 2.0 (http://www.amazon.com/gp/product/1590596099/) * Hardening Linux (http://www.amazon.com/gp/product/1590594444/) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJwh6K9hTGvAxC30ARAqeEAJwKNYSiccjB28NouQRxB2jwi/lYLACgy4yB hO81VCvNYCPnAz5MQUJ5fWo=wSVV -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 19/3/09 James Turnbull wrote:> Have a resource in one module depend on on a class in the module. > There > isn''t a way of directly making on module dependent on another module. > > There was a long thread of this last week or the week before that > might > have food for thought.Dog - let me re-write that - apologies very tired: There isn''t a way of directly making one module dependent on another module. So have a resource in one module depend on a class in the other module - using the require/before metaparameters. There was a long thread of this last week or the week before that might have food for thought. Regards James Turnbull - -- Author of: * Pulling Strings with Puppet (http://www.amazon.com/gp/product/1590599780/) * Pro Nagios 2.0 (http://www.amazon.com/gp/product/1590596099/) * Hardening Linux (http://www.amazon.com/gp/product/1590594444/) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJwh+09hTGvAxC30ARAqXpAKC0MG80Fi7Mqo4o3D88r7WnJS76bgCbBnDo cp7LPzL/xnRJflNBfLHefP0=8xdz -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Thu, Mar 19, 2009 at 10:13:59AM +0000, Craig Dunn wrote:> > Whats the best way of depending on a module - for example, I have an lvm > and a mysql module - on booting a clean machine it''s important that lvm > be set up before the mysql rpm installs as I want mysql on a volume. I > can''t see an easy (clean) way of making sure the mysql module installs > after the lvm module apart from depending on some resource that the lvm > module creates, which seems a bit dirty. > > Is there a better way of doing this?There''s no direct way to set up module/class dependencies, no. You can have the main class in your mysql module include the main class in your lvm module, you can do it indirectly through requiring a resource, as you''ve spotted. For my own purposes, I think I''m going to have to create a generic module named "package", so that I can define package::$packagename classes for any packages that may require special treatment. That way, if I were solving your particular problem, I''d have a resource in the lvm module set to "require => Class[package::lvm'']". I''d do it that way because, as I just recently established, this requirement will be satisfied by anything that inherits from ''package::lvm'', which allows me to extend the behaviour of the lvm class in different contexts, transparently. -- Bruce Those who cast the votes decide nothing. Those who count the votes decide everything. -- Joseph Stalin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---