There are many useful third-party modules (some by puppetlabs itself) that you can add to your puppet manifests to solve common problems.
However, you need to first install them.
If you're using Vagrant, one option is to use a
shell provisioner to install the extra modules on the guest system (example with one of the most useful modules,
puppetlabs/stdlib). Something like:
Vagrant.configure("2") do |config| # other configs config.vm.provision :shell, :inline => "mkdir -p /etc/puppet/modules && ( (puppet module list | grep puppetlabs-stdlib) || puppet module install puppetlabs/stdlib)" # other configs end
In the spirit of making sure our provisions are always idempotent (that is, stateless), make sure you verify that the module isn't already installed before you try installing it!
If you're using puppet command line tools, it's even easier:
$ puppet module install puppetlabs-stdlib