From 61252fe74c8ec3668af551fb0b0b91f1bfa4705a Mon Sep 17 00:00:00 2001 From: varac Date: Sun, 21 May 2017 23:28:20 +0200 Subject: [vagrant] Use eth1 on vagrant if present Virtualbox adds eth1 as second interface when private networking is enabled. - Related: #7769 --- puppet/modules/site_config/lib/facter/vagrant.rb | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 puppet/modules/site_config/lib/facter/vagrant.rb (limited to 'puppet/modules/site_config/lib/facter/vagrant.rb') diff --git a/puppet/modules/site_config/lib/facter/vagrant.rb b/puppet/modules/site_config/lib/facter/vagrant.rb new file mode 100644 index 00000000..29a218dd --- /dev/null +++ b/puppet/modules/site_config/lib/facter/vagrant.rb @@ -0,0 +1,8 @@ +# Checks if systems runs inside vagrant +require 'facter' + +Facter.add(:vagrant) do + setcode do + FileTest.exists?('/vagrant') + end +end -- cgit v1.2.3