vagrant icon indicating copy to clipboard operation
vagrant copied to clipboard

OPNsense guest plugin

Open DonGiovanni83 opened this issue 3 years ago • 2 comments

Description

Even though OPNsense is based on FreeBSD, hostname settings are not managed via the /etc/rc.conf. To correctly configure hostname (and domainname) in OPNSense the /conf/config.xml has to be updated with the desired values. After that the Firewall has to be reloaded with the /usr/local/etc/rc.reload_all command. This ensures that the changes in the config file are applyed through the whole system.

Example

  1. Vagrantfile:

    Vagrant.configure("2") do |config|
      config.vm.box = "fbertagna/opnsense"
      config.vm.box_version = "22.1.2"
      config.vm.hostname = "opnsense.vagrant.test"
    end
    
  2. vagrant up

  3. Firewall is configured: Screenshot from 2022-07-28 15-40-39

See #12817

DonGiovanni83 avatar Jul 28 '22 15:07 DonGiovanni83

CLA assistant check
All committers have signed the CLA.

hashicorp-cla avatar Jul 28 '22 15:07 hashicorp-cla

Hi there, thanks for opening up a PR for adding support for OPNsense guests! This change set looks great. But as we move towards Vagrant 3.0 we are looking to externalize plugins that aren't critical to Vagrant's core functions. So, would you consider building this plugin as an external plugin? This should be really easy to do (you already did all the hard work of implementing the required capabilities) using the template repo for building guest plugins.

soapy1 avatar Sep 19 '22 14:09 soapy1

Thanks for the feedback. The guest plugin has been externalized and published to rubygems.org.

  • repo: https://github.com/puzzle/vagrant-guest-opnsense
  • gem: https://rubygems.org/gems/vagrant-guest-opnsense

I think with that done, this MR can be closed.

Tanks for your time.

DonGiovanni83 avatar Sep 27 '22 11:09 DonGiovanni83