GithubHelp home page GithubHelp logo

arineng / arin-file_header Goto Github PK

View Code? Open in Web Editor NEW
0.0 12.0 0.0 132 KB

Grants the ability to easily manage and set a consistent header across multiple types for files managed via Puppet

Ruby 27.39% Puppet 20.43% HTML 52.18%

arin-file_header's Introduction

file_header

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 file_header
  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.

Overview

This module grants the ability to easily manage and set a consistent header across multiple types for files managed via Puppet

Module Description

This module grants the ability to set a file header from default parameter(s) set in the module, additionally you can set custom or overridge values in hiera.

Setup

puppet module install arineng-file_header -i /path/to/modules

Usage

This module can be used both with the default file type

define my_define {

    require file_header
    file {'/some/configuration/with/pound/comments':
        ensure => 'present',
        ...
        content => template("$file_header::pound_header", "other file contents")
    }
}

and with the PuppetLabs Concat module

define my_define {

  require file_header
  $concat_target_somefile_conf = "${somefile_destination}/conf/somefile.conf"

  concat { $concat_target_somefile_conf:
    ensure => present,
    owner  => 'root',
    group  => 'wheel',
    mode   => '0755',
  }

  include ::file_header
  concat::fragment { 'puppet_header':
    target  => $concat_target_somefile_conf,
    content => template("$::file_header::pound_header"),
    order   => '00',
  }

  concat::fragment { 'somefile.conf_main':
    target  => $concat_target_somefile_conf,
    content => template('somefile/somefile.conf.erb'),
    order   => '01',
  }

}

Reference

The inspiration for this module spawned from boundedinfinity/bi-puppet-banner, but without the need for the ripienaar/puppet-module-data dependency.

Limitations

This module was test with CentOS 6.x, currently no limitations that that should prevent it from being used with other versions or OS's.

arin-file_header's People

Contributors

smbambling avatar

Watchers

 avatar Devon Mizelle avatar  avatar  avatar James Cloos avatar Jacob Castello avatar Andrew Newton avatar Pete Toscano avatar Leo Deng avatar Jasdip Singh avatar Robert Bellante Jr avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.