Forge Home

cloudinit

Helper to install Amazon Cloudinit scripts

11,130 downloads

10,262 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.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

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.