Forge Home


Small Puppet fact to expose metadata for Digital Ocean virtual machines


6,655 latest version

3.6 quality score

Version information

  • 1.0.0 (latest)
  • 0.0.3
  • 0.0.2
  • 0.0.1
released Oct 21st 2017

Start using this module

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

Add this module to your Puppetfile:

mod 'jethrocarr-digitalocean', '1.0.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add jethrocarr-digitalocean
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install jethrocarr-digitalocean --version 1.0.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.



jethrocarr/digitalocean — version 1.0.0 Oct 21st 2017


Provides a small fact for exposing Digital Ocean metdata (

Include this module on any Digital Ocean instance and it will expose a number of metrics including:

  • digital_ocean_dns_nameservers
  • digital_ocean_hostname
  • digital_ocean_id
  • digital_ocean_interfaces_public_0_ipv4_address
  • digital_ocean_interfaces_public_0_ipv4_gateway
  • digital_ocean_interfaces_public_0_ipv4_netmask
  • digital_ocean_interfaces_public_0_ipv6_address
  • digital_ocean_interfaces_public_0_ipv6_cidr
  • digital_ocean_interfaces_public_0_ipv6_gateway
  • digital_ocean_interfaces_public_0_mac
  • digital_ocean_interfaces_public_0_type
  • digital_ocean_public_keys
  • digital_ocean_region
  • digital_ocean_tags


These are the same as any other fact, you can simply read them with $::name, eg:

if ($::digital_ocean_id) {
  notify { "You are running on digital ocean in region: ${::digital_ocean_region}": }


If the fact doesn't work for some reason, run with facter --debug to get any errors being thrown.