How can I check if some package installed in manifest? Only by writing facter plugin? For example: if ssh_installed { file{"/etc/ssh/sshd_config": source =>......... } } Alexey Wasilyev Systems Administrator Grid Dynamics --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Facter plugin is one way. An easier way is to install the package with puppet and have the file require the package. -Eric On Tue, 4 Aug 2009, Alexey Wasilyev wrote:> > How can I check if some package installed in manifest? > Only by writing facter plugin? > > For example: > > if ssh_installed { > file{"/etc/ssh/sshd_config": > source =>......... > } > } > > Alexey Wasilyev > Systems Administrator > Grid Dynamics > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
You can also use unless or onlyif. Here''s an example where I manipulate /foo/bar if package baz is not installed via rpm: file { "/foo/bar": source => .... unless => "rpm -q baz" } Same thing with ''onlyif''. Pete On Tue, Aug 4, 2009 at 11:37 PM, Eric Heydrick <erichey@speakeasy.net>wrote:> > Facter plugin is one way. An easier way is to install the package with > puppet and have the file require the package. > > -Eric > > On Tue, 4 Aug 2009, Alexey Wasilyev wrote: > > > > > How can I check if some package installed in manifest? > > Only by writing facter plugin? > > > > For example: > > > > if ssh_installed { > > file{"/etc/ssh/sshd_config": > > source =>......... > > } > > } > > > > Alexey Wasilyev > > Systems Administrator > > Grid Dynamics > > > > > > > > > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---