Installing open-vm-tools in Ubuntu via Puppet; what's the lesser evil?

Bug 1766 indicated that the aptitude provider installs recommended packages, while the apt provider does not.

If that's correct (I've not verified it myself), then the following may work more cleanly:

package { [ "open-vm-tools", "open-vm-dkms" ]:
  ensure   => installed,
  provider => apt,
}

Adapted from Puppet Type Reference, "package" section.


Edit after further investigation: since the apt provider is the default on Ubuntu and Debian, use the aptitude provider for these packages, and add a suitable ~/.aptitude/config for root.

package { [ "open-vm-tools", "open-vm-dkms" ]:
  ensure   => installed,
  provider => aptitude,
  require  => File["/root/.aptitude/config"];
}
file { "/root/.aptitude/config":
  ensure  => present,
  content => 'APT::Install-Recommends "0";';
}

Not perfect, but more concise than a giant exec line.


It looks like on 12.04, apt-get install open-vm-tools no longer installs X.

Ubuntu wiki on VMware Tools