diff options
author | varac <varacanero@zeromail.org> | 2017-05-21 23:28:20 +0200 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2017-05-23 11:35:13 +0200 |
commit | 61252fe74c8ec3668af551fb0b0b91f1bfa4705a (patch) | |
tree | 42ceb26cd317c8c567d49654b316e38ad612f3be /puppet/modules/site_config/lib | |
parent | 26be1f84de9efabf5fec1278401ae0c5538454d9 (diff) |
[vagrant] Use eth1 on vagrant if present
Virtualbox adds eth1 as second interface when private networking
is enabled.
- Related: #7769
Diffstat (limited to 'puppet/modules/site_config/lib')
-rw-r--r-- | puppet/modules/site_config/lib/facter/vagrant.rb | 8 |
1 files changed, 8 insertions, 0 deletions
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 |