vagrant-registration plugin for Vagrant allows developers to easily register their guests for updates on systems with a subscription model like Red Hat Enterprise Linux. Here is how to install the plugin and set it up.
You can install vagrant-registration plugin as:
$ vagrant plugin install vagrant-registration
Note that on Fedora, we have it packaged:
$ sudo dnf install vagrant-registration
After installation you are able to update your project’s Vagrantfile (or global Vagrantfile for every project as I already mentioned):
$ cat Vagrantfile ... if Vagrant.has_plugin?('vagrant-registration') config.registration.username = 'foo' config.registration.password = 'bar' end # Alternatively if Vagrant.has_plugin?('vagrant-registration') config.registration.org = 'foo' config.registration.activationkey = 'bar' end
As you can see, you can either choose
org/activationkey combinations to register your RHEL box. This will run subscription-manager register on
vagrant up and unregister on
vagrant halt and
You can even choose to unregister only on destroy:
config.registration.unregister_on_halt = false
or skip registration altogether:
config.registration.skip = true
You need to explicitly skip registration because otherwise the plugin will prompt you for your
username/password input interactively.
If you need to pass more options to subscription-manager register, vagrant-registration supports all the options of
register command. By default it appends
Also support for other systems such as SLES would be very easy to add, but I don’t have the subscription to properly test it. Perhaps some of you can help?
← BUY THE PRE-RELEASE
I am writing a complete guide on web application deployment. Ruby with Puma, Python with Gunicorn, NGINX, PostgreSQL, Redis, networking, processes, systemd, backups, and all your usual suspects. 19 chapters and 2 case studies already available.