Skip to content
This repository has been archived by the owner on Dec 9, 2020. It is now read-only.

Commit

Permalink
vagrant: Make landrush optional
Browse files Browse the repository at this point in the history
It's not packaged for Fedora right now, I'm using Atomic Workstation
where I'm trying to minimize stuff installed on the host, and finally
even if I did run it, I use dnsmasq for the whole system, plus libvirt
already uses dnsmasq, so networking gets super complicated with
another resolver.

This will make it easier for me to hack on this for now...I'll
probably investigate landrush at some point though.
  • Loading branch information
cgwalters committed Nov 21, 2016
1 parent d21f5df commit df0f724
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions vagrant/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,21 @@ origin_os = ENV['ORIGIN_OS'] || 'centos'
rhsm_pool = ENV['RHSM_POOL'] || 'Employee SKU'
sync_type = ENV['SYNC_TYPE'] || ''

REQUIRED_PLUGINS = %w(vagrant-hostmanager)
SUGGESTED_PLUGINS = %w(vagrant-sshfs landrush)

def message(name)
"#{name} plugin is not installed, run `vagrant plugin install #{name}` to install it."
end

SUGGESTED_PLUGINS.each { |plugin| print("note: " + message(plugin) + "\n") unless Vagrant.has_plugin?(plugin) }

if deployment_type == 'openshift-enterprise'
REQUIRED_PLUGINS = %w(vagrant-registration vagrant-hostmanager landrush)
else
REQUIRED_PLUGINS = %w(vagrant-hostmanager landrush)
REQUIRED_PLUGINS.push('vagrant-registration')
end

errors = []

def message(name)
"#{name} plugin is not installed, run `vagrant plugin install #{name}` to install it."
end
# Validate and collect error message if plugin is not installed
REQUIRED_PLUGINS.each { |plugin| errors << message(plugin) unless Vagrant.has_plugin?(plugin) }
unless errors.empty?
Expand Down Expand Up @@ -64,9 +68,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.hostmanager.ignore_private_ip = false
# config.hostmanager.include_offline = true

config.landrush.enabled = true
config.landrush.tld = 'example.com'
config.landrush.guest_redirect_dns = false
if Vagrant.has_plugin?('landrush')
config.landrush.enabled = true
config.landrush.tld = 'example.com'
config.landrush.guest_redirect_dns = false
end

if deployment_type == 'openshift-enterprise'
# vagrant-registration
Expand Down

0 comments on commit df0f724

Please sign in to comment.