An approach I've taken on my own Vagrant boxes is to use the local "snakeoil" certificate, and parametise my classes where needed so that I can pass in a different cert.
class custom::profile::apache(
$vhost_domain = $::fqdn,
$use_letsencrypt = true,
){
if $::custom::profile::apache::use_letsencrypt == true {
$ssl_cert = "/etc/letsencrypt/live/${::custom::profile::apache::vhost_domain}/cert.pem"
$ssl_key = "/etc/letsencrypt/live/${::custom::profile::apache::vhost_domain}/privkey.pem"
$ssl_chain = "/etc/letsencrypt/live/${::custom::profile::apache::vhost_domain}/chain.pem"
$require = Exec["letsencrypt certonly ${::fqdn}"]
} else {
$ssl_cert = '/etc/ssl/certs/ssl-cert-snakeoil.pem'
$ssl_key = '/etc/ssl/private/ssl-cert-snakeoil.key'
$ssl_chain = undef
$require = undef
}
include ::apache
::apache::vhost { "https-${::custom::profile::apache::vhost_domain}":
...
ssl_cert => $ssl_cert,
ssl_key => $ssl_key,
ssl_chain => $ssl_chain,
require => $require,
}
}