Skip to content

Commit

Permalink
Enterprise Linux 7 Dynamic network cards fix.
Browse files Browse the repository at this point in the history
Uses fedora's network configuration for RedHat and CentOS 7.

Possibly fixes hashicorp#4171 but I doubt this is the 'cleanest' way. Pointers
welcome.
  • Loading branch information
vStone committed Jul 15, 2014
1 parent 5c148e4 commit 37d18e9
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
11 changes: 11 additions & 0 deletions plugins/guests/enterprise7/guest.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module VagrantPlugins
module GuestEnterpriseLinux7

class Guest < Vagrant.plugin('2', :guest)
def detect?(machine)
machine.communicate.test('grep "\(CentOS\|Red Hat Enterprise\) Linux release 7" /etc/redhat-release')
end
end

end
end
22 changes: 22 additions & 0 deletions plugins/guests/enterprise7/plugin.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
require 'vagrant'

module VagrantPlugins
module GuestEnterpriseLinux7

class Plugin < Vagrant.plugin("2")
name "Enterprise Linux 7 Guest"
description "Enterprise Linux 7 guest support."

guest("el7", "redhat") do
require File.expand_path("../guest", __FILE__)
Guest
end

guest_capability("el7","configure_networks") do
require File.expand_path("../../fedora/cap/configure_networks", __FILE__)
::VagrantPlugins::GuestFedora::Cap::ConfigureNetworks
end

end
end
end

0 comments on commit 37d18e9

Please sign in to comment.