Forge Home

cloudinit

Helper to install Amazon Cloudinit scripts

10,989 downloads

10,184 latest version

4.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.4 (latest)
  • 1.0.3
  • 1.0.2
  • 1.0.1
  • 1.0.0
released Mar 2nd 2015
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 'yo61-cloudinit', '1.0.4'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add yo61-cloudinit
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install yo61-cloudinit --version 1.0.4

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

yo61/cloudinit — version 1.0.4 Mar 2nd 2015

Table of Contents

  1. Overview - What is the cloudinit module
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with cloudinit
  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

This module installs cloudinit scripts on Amazon EC2 instances

Module Description

Cloud-init is the defacto multi-distribution package that handles early initialization of a cloud instance.

This module helps you install cloud-init scripts to your EC2 nodes.

Setup

What cloudinit affects

cloudinit::script installs scripts to the cloudinit script base directory, /var/lib/cloud/scripts

Beginning with cloudinit

To install a per-instance cloudinit script:

  cloudinit::script{'my-first-cloudinit-script':
    source      => "puppet:///modules/${module_name}/my-first-cloudinit-script",
  }

This is the same thing, but explicitly specifying the default values:

  cloudinit::script{'my-first-cloudinit-script':
    ensure      => present,
    source      => "puppet:///modules/${module_name}/my-first-cloudinit-script",
    script_type => 'per-instance',
  }

Usage

Classes and Defined Types

Defined Type: cloudinit::script

Installs a cloud-init script in the correct location according to its type.

  cloudinit::script{'my-first-cloudinit-script':
    source      => "puppet:///modules/${module_name}/my-first-cloudinit-script",
  }

Parameters within cloudinit::script: #####ensure Specify whether the script file is present or absent. Default: 'present'. Valid values are 'present' and 'absent'. #####source The source of the script file. See puppet documentation for usage. Exactly one of source or content must be specified. #####content The desired contents of the script file. See puppet documentation for details. Exactly one of source or content must be specified. #####script_type The type of script to install. This determines the location of the script within the script base dir. Default: 'per-instance'. Valid values are 'per-instance', 'per-boot', and 'per-once'. #####script_base The cloud-init script base directory. Default: '/var/lib/cloud/scripts'. #####owner The user to whom the file should belong. See puppet documentation. Default: 'root' #####group Which group should own the file. See puppet documentation. Default: '0'. #####mode The desired permissions mode for the script. See puppet documentation. Default: '0750'.

Reference

Classes

This module contains no classes.

Defined Types

  • cloundinit::script: installs a cloudinit script

Limitations

This module should work on any EC2 platform, but it has only been tested on Ubuntu 12.10 and CentOS 7.

Development

See separate CONTRIBUTING.md document.