Forge Home

ec2legacy

Adds flattened EC2 facts removed in Facter 3.x

105,003 downloads

104,894 latest version

4.5 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

  • 0.1.1 (latest)
  • 0.1.0
released Aug 25th 2015
This version is compatible with:
  • Puppet Enterprise >= 2015.2.0
  • Puppet >= 4.0.0

Start using this module

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

Add this module to your Puppetfile:

mod 'mrzarquon-ec2legacy', '0.1.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add mrzarquon-ec2legacy
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install mrzarquon-ec2legacy --version 0.1.1

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
Tags: facts, ec2, aws, amazon

Documentation

mrzarquon/ec2legacy — version 0.1.1 Aug 25th 2015

##ec2legacy facts module

This is a module that returns the flattened facts that were removed from facter in the 3.X release.

###Behavior: This fact only does anything for Facter 3.x users (and is restricted to do so, in case you have mixed versions in your environment). It takes the ec2_metadata structured fact and runs it through the previous flatten facts function (also backported in this module) to generate the old fact information. This should be a temporary "until you can get around to updating your tests / manifests to use the structured fact" fix, but in theory this should keep working as is for a long time (this is full self contained and just requires the ec2_metadata and facterversion facts to continue working).

###Example:

In facter 3 we get ec2_metadata such as:

facter -p ec2_metadata
{
  ami-id => "ami-4dbf9e7d",
  ami-launch-index => "0",
...
}

This fact adds the following:

ec2_ami_id => ami-4dbf9e7d
ec2_ami_launch_index => 0

###Compatibility:

This is a ruby fact that is just processing an existing fact (ec2_metadata) that has been present since the Facter 2.x series. This should in theory work for any version of facter since 2.x and on any platform. It has only been tested on PE 2015.2.0, but should work consistently for anyone who is using the AIO puppet 4 packages since they are shared between PE and Opensource Puppet releases now.