Class: VagrantHosts::Cap::Facts::POSIX
- Defined in:
- lib/vagrant-hosts/cap/facts/posix.rb
Overview
Base class for retrieving network facts from POSIX
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from VagrantHosts::Cap::Facts::Base
Instance Method Details
#load_facts ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/vagrant-hosts/cap/facts/posix.rb', line 8 def load_facts facts = {} facts['networking'] = {} facts['networking']['interfaces'] = parse_ifconfig iface = get_default_iface facts['networking']['ip'] = facts['networking']['interfaces'][iface]['ip'] facts end |