Forge Home

digitalocean

Small Puppet fact to expose metadata for Digital Ocean virtual machines

12,811 downloads

6,920 latest version

3.6 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

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.

Download

Documentation

jethrocarr/digitalocean — version 1.0.0 Oct 21st 2017

puppet-digitalocean

Provides a small fact for exposing Digital Ocean metdata (https://developers.digitalocean.com/documentation/metadata/).

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

Usage

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}": }
}

Troubleshooting

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