Forge Home


This module provides a set of functions to describe file content from eyaml encrypted sources.


6,560 latest version

5.0 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.3.1 (latest)
  • 0.3.0
  • 0.2.0
  • 0.1.0
released Jun 7th 2016
This version is compatible with:
  • , , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'WhatsARanjit-eyaml_functions', '0.3.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add WhatsARanjit-eyaml_functions
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install WhatsARanjit-eyaml_functions --version 0.3.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.



WhatsARanjit/eyaml_functions — version 0.3.1 Jun 7th 2016

#eyaml_functions Build Status

####Table of Contents

  1. Overview
  2. Requirements
  3. Setup
  4. Usage


This module provides a set of functions to describe file content from eyaml encrypted sources.


The functions in this module require that the hiera-eyaml gem is installed and keys generated. The backend does not need to be in use. The location of the public and private keys are read from either a separate config or the hiera.yaml file.


Non-Hiera Setup

Place a file at $environmentpath/$environment/eyaml.yaml with the location of they keys such as:

  :pkcs7_private_key: /etc/puppetlabs/puppet/keys/private_key.pkcs7.pem
  :pkcs7_public_key: /etc/puppetlabs/puppet/keys/public_key.pkcs7.pem
    :pkcs7_private_key: /etc/puppetlabs/puppet/keys/private_key.pkcs7_other.pem
    :pkcs7_public_key: /etc/puppetlabs/puppet/keys/public_key.pkcs7_other.pem

Follow the same guidelines for key permissions listed for the hiera-eyaml gem.

Hiera Setup

Follow the setup procedure for the hiera-eyaml gem Hiera configuration. Public and private key locations will be read from hiera.yaml as long as no file at $environmentpath/$environment/eyaml.yaml exists.



Converts an eyaml encrypted string to plain-text.


# return: "hello"

# Using another key pair
eyaml_string('ENC[PKCS7,MIIBeQYJKoZIhvcNAQcDoIIBajCCAWYCAQAxggEhMIIBHQIBADAFMAACAQEwDQYJKoZIhvcNAQEBBQAEggEA0G2Cl2yCPlMsXkj3KOzMYO+kyXdSIoVad533Gr1FQaU7VqpM+rbt7CYM5WytFNYotsYyqxoSW3pGKKGxHL9f0c4q+xGZHV1GaHoR4rCnTps6fpyWVENkQJPZoEKi/fHSN2y+TryCf7Bt+3WRumkspZtUiZ0sG5G0kC80ssrDbbm2mSxwcZ1AvfEozcrCtCHJr3qxmFMEkHvhpW/roumuyhlgwhre6tkE7gqyntFrAR5Hzlt0Mk83Fg345qyKh/aq3iAv412/GgbKhFlHtMDcfW2y5ntZozuyvG7W73HQ64snRNR9JLUzZuhm0o/YQfUYFoSQIQIdi/TxCXb6nIZ46DA8BgkqhkiG9w0BBwEwHQYJYIZIAWUDBAEqBBD5w0KZx5jxul3GUbSUXpvDgBCO/6XLdwlHb16bagi0igXf]', 'other')
# return: "hello"

Type: rvalue.


Converts an eyaml encrypted file to plain-text.


# Assume /tmp/test.txt contains only the string in the above example
# return: "hello"

# Assume $modulepath/foo/files/test.txt contains only the string in the above example
# return: "hello"

# Using another key pair
eyaml_file('/tmp/test.txt', 'other')
# return: "hello"

Type: rvalue.


If an alternate key pair is not given or the string given cannot be found, the default key bill be used.