cloudinit

Helper to install Amazon Cloudinit scripts

YO61 Limited

yo61

9,540 downloads

9,033 latest version

4.6 quality score

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:
  • CentOS
    ,
    Debian
    ,
    OracleLinux
    ,
    RedHat
    ,
    Scientific
    ,
    Ubuntu

Start using this module

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.