Re: [Puppet Users] require file/package not managed by puppet
On Friday, September 28, 2012 12:05:03 AM UTC-5, Stefan Schulte wrote: > > But it general determining the desired state (that's what puppet tries > to enforce) by looking at the current state (is the package installed?) > may not be the best design here. So why not finding out when the package > needs to be installed (e.g. because application X needs mysql) and then > enforce that rule by puppet? > > I agree. Where it can do so, it is usually better for Puppet to command than to inquire. A situation such as the OP's, where Puppet has the power to command but you don't want to use it, often signals disorganized or conflicting administration of the affected system. That is, if the person writing the Puppet manifests knows whether the package is supposed to be installed, then it is better all-around to just manage it. If he does *not* know, then that's either because someone else is responsible (and doesn't / won't share -- an administration conflict), or because the information is just not recorded (i.e. disorganized administration). In fairness, both situations are fairly common, and the second, especially, is a hallmark of sites that do not (yet) use an automated configuration management system. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/dGJ5_cFPu8YJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] require file/package not managed by puppet
On Thu, Sep 27, 2012 at 05:58:34AM -0700, jcbollinger wrote: > That's actually kinda cool, but I think either you've missed the OP's > point, or I'm missing yours. Declaring the package for only auditing > should indeed support any Puppet relationships with that resource without > forcing the package to be installed, but how does it achieve the main > objective of conditionally managing a file depending on whether the package > is installed? As far as I can tell, relationships in general cannot > address this problem. Am I missing something? > > > John > Nope, I did not read the question carefully enough. So as you already mentioned a custom fact should do the trick. But it general determining the desired state (that's what puppet tries to enforce) by looking at the current state (is the package installed?) may not be the best design here. So why not finding out when the package needs to be installed (e.g. because application X needs mysql) and then enforce that rule by puppet? -Stefan -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] require file/package not managed by puppet
On Wednesday, September 26, 2012 8:18:51 PM UTC-5, Stefan Schulte wrote: > > On Fri, Sep 21, 2012 at 05:40:52PM -0700, Justin Ryan wrote: > > I would like to place a file with puppet only if a certain package is > > installed on the system -- but assuming this package is not > puppet-managed. > > Checking for the presence of a non-puppet-managed file is also ok. Is > this > > possible? using require => Package['mypkg'] doesn't work if it's not > > puppet-managed. thanks. > > > > I haven't tried it but > > package { 'mypkg': > audit => all, > } > > should work. This way you are declaring the resource so you should be > able to refer to it later as Package['mypkg'] while on the other hand > only auditing the state and not actually changing it through puppet. > > That's actually kinda cool, but I think either you've missed the OP's point, or I'm missing yours. Declaring the package for only auditing should indeed support any Puppet relationships with that resource without forcing the package to be installed, but how does it achieve the main objective of conditionally managing a file depending on whether the package is installed? As far as I can tell, relationships in general cannot address this problem. Am I missing something? John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/Ol-CLuQnkj8J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] require file/package not managed by puppet
On Fri, Sep 21, 2012 at 05:40:52PM -0700, Justin Ryan wrote: > I would like to place a file with puppet only if a certain package is > installed on the system -- but assuming this package is not puppet-managed. > Checking for the presence of a non-puppet-managed file is also ok. Is this > possible? using require => Package['mypkg'] doesn't work if it's not > puppet-managed. thanks. > I haven't tried it but package { 'mypkg': audit => all, } should work. This way you are declaring the resource so you should be able to refer to it later as Package['mypkg'] while on the other hand only auditing the state and not actually changing it through puppet. -Stefan -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.