set_env

Module for setting environment variables during puppet agent runs

Vormetric Labs

vormetriclabs

9,723 downloads

9,404 latest version

4.6 quality score

Version information

  • 0.2.1 (latest)
  • 0.1.1
  • 0.1.0
released Feb 19th 2015
This version is compatible with:
  • RedHat
    ,
    Ubuntu
    ,
    windows

Start using this module

Documentation

vormetriclabs/set_env — version 0.2.1 Feb 19th 2015

set_env - Set Environment Variables during Puppet Runs

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with set_env
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module

Overview

When working with the puppetlabs-aws module we found it painful and less secure to have to hard code credentials, or store a file on the target puppet agent host with sensitive data in them. So instead we wanted pass the sensitive data in an environment variable. And thus the birth of set_env...

Module Description

set_env is a Puppet Custom Type that will set a variable for the current running puppet run

Setup

Installation is simple...

puppet module install vormetriclabs-set_env

or if using Librarian or r10k, add it to your Puppetfile

mod "vormetriclabs-set_env"

What set_env affects

  • The environment variables of the puppet agent during it's run only...

Usage

Setting a temporary environment variable is pretty easy:

set_env {"variable_name":
    value => "variable_value"
}

For example to set the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY for use in puppetlabs-aws

set_env {"AWS_ACCESS_KEY_ID":
    value => "ABCDEFG123456"
}
set_env {"AWS_SECRET_ACCESS_KEY":
    value => "abcdefg123456?!@#$%"
}

Reference

Here, list the classes, types, providers, facts, etc contained in your module. This section should include all of the under-the-hood workings of your module so people know what the module is touching on their system but don't need to mess with things. (We are working on automating this section!)

Limitations

Tested on:

  • Windows 7, 8, 8.1
  • CentOS/RHEL 5, 6, 7
  • Ubuntu 12.04, 14.04 LTS

Should work with just about any other OS though as its only requirements are puppet and ruby.

Development

Feel free to submit issues, or pull requests