Forge Home


Host Interface Facts


9,868 latest version

4.0 quality score

Version information

  • 2.1.0 (latest)
  • 2.0.2
  • 2.0.0
  • 0.0.1
released Oct 23rd 2014

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'panaman-hostint', '2.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add panaman-hostint
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install panaman-hostint --version 2.1.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



panaman/hostint — version 2.1.0 Oct 23rd 2014

Host Interface Facts

This module provides custom facts based on your machines interfaces.

##Description Custom Fact for the host interface on a machine. It finds the interface based on the gateway of netstat -rn. Works on FreeBSD, OSX, RedHat, Centos, Scientific, Ubuntu and probably others. I have found it extremely helpful building NSM servers and configure iptables. You can specify the variable <%= @hostint %> in your puppet templates.

Supports Interface, DNS, Duplex, Gateway, ipv4 address, ipv4 cidr, ipv4 max hosts, and Speed.

<%= @hostint %>           Host Interface - (Supports Kernel: FreeBSD, Darwin, Linux)
<%= @hostint_dns %>       Primary DNS Server (Supports Kernel: FreeBSD, Darwin, Linux) 
<%= @hostint_duplex %>    Full (Supports Kernel: Linux)
<%= @hostint_gw %> (Supports Kernel: FreeBSD, Darwin, Linux)
<%= @hostint_ipv4 %> (Supports Kernel: FreeBSD, Darwin, Linux)
<%= @hostint_ipv4_cidr %>  (CIDR Notation: Should work on all *Nix)
<%= @hostint_ipv4_max %>  256 (Maximum number of hosts: Should work on all *Nix)
<%= @hostint_speed %>     1000Mb/s (Supports Kernel: Linux)

##Todo Need to add Windows facts