On 04/21/2014 11:25 PM, Matt W wrote:
Hey we have a problem that I think we need to solve with a custom Puppet
provider, but I could use a bit of help getting started. Overall the
issue of being able to install multiple packages at-once has been
discussed a ton of times (issue #2128 for example). We ultimately need
to be able to pass in an arbitrary list of packages (and their versions)
to a package-like provider in Puppet and have it install them all at
once. For example:

   package { 'myapp':
     packages => [ 'backend=1.0', 'frontend=1.1' ],
     provider    => some_custom_provider;
   }

   Ultimately the provider would need to validate that each and every
package supplied (backend, and frontend in this example) are either
installed or not. If not, they are all installed on one commandline:

   aptitude install backend=1.0 frontend=1.1 -y -q -f

Should we just build a resource from scratch? or do you think we should
build a provider for the Package resource in Puppet and go from there?

Just write a custom exec to circumvent the issue. Something along these lines:

exec { 'install_linked_packages':
  command => "something install backend=1.0 frontend=1.1",
  unless  => "dpkg -l | grep -q fronted=1.1",
}

package { 'backend=1.0':
  requires => Exec['install_linked_packages'],
}
package { 'fronted=1.1':
  requires => Exec['install_linked_packages'],
}

--
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/5356B9C0.50409%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to