puppetlabs / provision

Simple tasks to provision and tear_down containers / instances and virtual machines.
Apache License 2.0
20 stars 53 forks source link

OpenBSD support #224

Open bodgit opened 3 years ago

bodgit commented 3 years ago

Use Case

I'm looking at converting modules using Beaker to use Litmus instead. A few of my modules are designed to work on OpenBSD as well as Linux so I updated my provision.yaml:

---
vagrant:
  provisioner: vagrant
  images: [..., 'generic/openbsd6']

and then got this:

$ bundle exec rake 'litmus:provision_list[vagrant]'
[✔] Provisioning generic/openbsd6 using vagrant provisioner.
rake aborted!
provisioning of generic/openbsd6 failed.
Results:
  localhost: {"_error"=>{"kind"=>"facter_task/failure", "msg"=>"Unsupported Platform: 'generic/openbsd6'", "details"=>{}}}}
---8<---
Tasks: TOP => litmus:provision_list
(See full trace by running task with --trace)

Describe the Solution You Would Like

It would be nice if OpenBSD support could be added (this likely affects other less popular OS that are supported by Puppet).

Because I'm reliant on whatever release(s) of Puppet are shipped with that particular OpenBSD release I've tended to just bake the Puppet agent package into the Vagrant box and then not try and install it as part of the acceptance test run, i.e. my Beaker spec_helper_acceptance.rb contains something like this:

hosts.each do |host|
  unless %r{^openbsd-}i.match?(host['platform'])
    run_puppet_install_helper_on(host)
  end
end

However, the litmus:install_agent Rake task could be made to install those fixed versions. Currently on OpenBSD 6.9 these are the two Puppet versions available:

$ pkg_info -I puppet
puppet-5.5.22p7     centralised configuration management for networks
puppet-6.21.1p0     centralised configuration management for networks

So if I were to run bundle exec rake litmus:install_agent[puppet5] I'd expect to get that 5.5.22 package.

Describe Alternatives You've Considered

jordanbreen28 commented 1 year ago

Hey @bodgit, thanks for raising this one. This error seems to stem from the provision module, so I will go ahead and transfer the issue to that repo.