Passing Vagrant parameters to Puppet Litmus

March 7, 2021 

Puppet Litmus allows creating SUTs ("System Under Test") with Vagrant using Virtualbox or Hyper-V as the virtualization backend. However, the default virtual machine settings like 1024MB of memory are only suitable for very simple modules and applications. For example, Litmus testing our puppetmaster-installer will fail with the default settings.

Litmus documentation tells us that you can define parameters in provision.yaml which get then converted to environment variables. What it does not tell what to use these environment variables for. Looking at the Vagrant code in Litmus you can see that those environment variables can be used to drive the Virtualbox settings, among other things:


So, to provision a Vagrant SUT with 4096MB of memory you'd have provision.yaml like this:

  provisioner: vagrant
  images: ['ubuntu/bionic64']
    vagrant_memory: 4096

For details of the supported Vagrant parameters refer to vagrant.rb.

Samuli Seppänen
Samuli Seppänen
Author archive