digitalocean

contributions requested
Small Puppet fact to expose metadata for Digital Ocean virtual machines

12,980 downloads

7,034 latest version

3.6 quality score

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

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.