From 37d18e9dfcb0a5f1d5020e5b1954111b19944bdf Mon Sep 17 00:00:00 2001 From: Jan Vansteenkiste Date: Tue, 15 Jul 2014 09:11:00 +0200 Subject: [PATCH] Enterprise Linux 7 Dynamic network cards fix. Uses fedora's network configuration for RedHat and CentOS 7. Possibly fixes #4171 but I doubt this is the 'cleanest' way. Pointers welcome. --- plugins/guests/enterprise7/guest.rb | 11 +++++++++++ plugins/guests/enterprise7/plugin.rb | 22 ++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 plugins/guests/enterprise7/guest.rb create mode 100644 plugins/guests/enterprise7/plugin.rb diff --git a/plugins/guests/enterprise7/guest.rb b/plugins/guests/enterprise7/guest.rb new file mode 100644 index 00000000000..4b37d1b5c88 --- /dev/null +++ b/plugins/guests/enterprise7/guest.rb @@ -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 diff --git a/plugins/guests/enterprise7/plugin.rb b/plugins/guests/enterprise7/plugin.rb new file mode 100644 index 00000000000..fa865ca8a81 --- /dev/null +++ b/plugins/guests/enterprise7/plugin.rb @@ -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