Custom Facts that return the geograpical and ip address of the puppet agents internet egress point

Vormetric Labs



8,368 latest version

4.6 quality score

Version information

  • 0.1.1 (latest)
  • 0.1.0
released Feb 27th 2015
This version is compatible with:
  • RedHat

Start using this module


vormetriclabs/fact_geoip — version 0.1.1 Feb 27th 2015


Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with fact_geoip
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Limitations - OS compatibility, etc.
  6. Development - Guide for contributing to the module


This module is a custom fact that returns the geographical information and ip address of the agents edge ip address to the internet.

This can be very useful if you are using puppet with roaming devices(laptops, failover vms, etc...)

Module Description

Ever want to know where a puppet agent "Actually" is? Maybe you are managing a fleet of laptops for a sales force, and want to track location of it's internet connection? Or how about applying the timezone for a server based on it's internet egress point, without any hardcoding?

This module utilizes 2 cloud based services, ipify, and freegeoip, to get the internet egress point IP address(edge router), and it's geolocation information.


What fact_geoip affects

  • Nothing

Beginning with fact_geoip

Just install the module

puppet module install vormetriclabs/fact_geoip


The list of facts returned about the location of the devices internet egress point.

  • geoip_city => Mountain View
  • geoip_country_code => US
  • geoip_country_name => United States
  • geoip_ipaddress =>
  • geoip_latitude => 37.386
  • geoip_longitude => -122.084
  • geoip_metro_code => 807
  • geoip_region_code => CA
  • geoip_region_name => California
  • geoip_time_zone => America/Los_Angeles


Anything that supports Ruby net/http


Feel free to fork, code up, and pull request.