Skip to content

Commit

Permalink
Merge pull request #70 from dhoppe/readme
Browse files Browse the repository at this point in the history
Add missing badges
  • Loading branch information
bastelfreak committed Oct 23, 2016
2 parents 113c465 + 32e1ace commit c4217de
Showing 1 changed file with 22 additions and 24 deletions.
46 changes: 22 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# extlib
# Extlib module for Puppet

[![Puppet Forge](http://img.shields.io/puppetforge/v/puppet/extlib.svg)](https://forge.puppetlabs.com/puppet/extlib)
[![Puppet Forge downloads](https://img.shields.io/puppetforge/dt/puppet/extlib.svg)](https://forge.puppetlabs.com/puppet/extlib)
[![Puppet Forge score](https://img.shields.io/puppetforge/f/puppet/extlib.svg)](https://forge.puppetlabs.com/puppet/extlib)
[![Build Status](https://travis-ci.org/voxpupuli/puppet-extlib.png)](https://travis-ci.org/voxpupuli/puppet-extlib)
[![Build Status](https://travis-ci.org/voxpupuli/puppet-extlib.png?branch=master)](https://travis-ci.org/voxpupuli/puppet-extlib)
[![Code Coverage](https://coveralls.io/repos/github/voxpupuli/puppet-extlib/badge.svg?branch=master)](https://coveralls.io/github/voxpupuli/puppet-extlib)
[![Puppet Forge](https://img.shields.io/puppetforge/v/puppet/extlib.svg)](https://forge.puppetlabs.com/puppet/extlib)
[![Puppet Forge - downloads](https://img.shields.io/puppetforge/dt/puppet/extlib.svg)](https://forge.puppetlabs.com/puppet/extlib)
[![Puppet Forge - endorsement](https://img.shields.io/puppetforge/e/puppet/extlib.svg)](https://forge.puppetlabs.com/puppet/extlib)
[![Puppet Forge - scores](https://img.shields.io/puppetforge/f/puppet/extlib.svg)](https://forge.puppetlabs.com/puppet/extlib)

#### Table of Contents

Expand All @@ -15,26 +17,23 @@

## Overview

This module provides functions that are out of scope for
[stdlib](https://github.com/puppetlabs/puppetlabs-stdlib). Some of them are
even intrinsically tied to stdlib.
This module provides functions that are out of scope for [stdlib](https://github.com/puppetlabs/puppetlabs-stdlib).
Some of them are even intrinsically tied to stdlib.

##Setup
## Setup

```console
% puppet module install puppet-extlib
```

##Usage
## Usage

### resources_deep_merge

- *Type*: rvalue

Returns a [deep-merged](#deep_merge) resource hash (hash of hashes).

*Examples:*

```puppet
$tcresource_defaults = {
ensure => 'present',
Expand Down Expand Up @@ -125,13 +124,15 @@ echo($v7) # no comment here

### cache_data

Retrieves data from a cache file, or creates it with supplied data if the file doesn't exist. Useful for having data that's randomly generated once on the master side (e.g. a password), but then stays the same on subsequent runs. The `cache_data` takes three parameters:

* namespace: the folder under Puppet's vardir that the data is placed (e.g. mysql becomes /var/lib/puppet/mysql)
* data_name: the filename to store the data as (e.g. mysql_password becomes /var/lib/puppet/mysql/mysql_password)
* initial_data: the data to store and cache in the data_name file
Retrieves data from a cache file, or creates it with supplied data if the file
doesn't exist. Useful for having data that's randomly generated once on the
master side (e.g. a password), but then stays the same on subsequent runs. The
`cache_data` takes three parameters:

*Examples:*
* namespace: the folder under Puppet's vardir that the data is placed (e.g. mysql
becomes /var/lib/puppet/mysql)
* data_name: the filename to store the data as (e.g. mysql_password becomes /var/lib/puppet/mysql/mysql_password)
* initial_data: the data to store and cache in the data_name file

```puppet
class mymodule::params {
Expand All @@ -145,8 +146,6 @@ class mymodule::params {

Returns a string of arbitrary length that contains randomly selected characters.

*Examples:*

```
Prototype:
Expand All @@ -173,9 +172,8 @@ The result will be as follows:

### default_content

Takes an optional content and an optional template name and returns the contents of a file.

*Examples:*
Takes an optional content and an optional template name and returns the contents
of a file.

```puppet
$config_file_content = default_content($file_content, $template_location)
Expand All @@ -185,7 +183,7 @@ file { '/tmp/x':
}
```

##Limitations
## Limitations

This module requires puppetlabs-stdlib >=3.2.1, which is when `deep_merge()`
was introduced.
Expand Down

0 comments on commit c4217de

Please sign in to comment.