Giter Club home page Giter Club logo

puppet-module-yamlfile's Introduction

yamlfile

yamlfile module with yaml_setting type+provider, a la Chris Price’ inifile module / ini_setting type+provider

This is an experimental utility module allowing for more dynamic configuration of the myriad of yaml files used to configure various yaml-configured ruby applications with finer grained control than templates would easily allow.

A rapid prototype provider is included built using Adrien Thebo’s filemapper utility module. It won’t account for comments but it mostly works.

Usage

The type interface is probably the hardest part and is largely a design question. The prototype says screw it, K.I.S.S., and assumes hashes are the most common thing to be dealing with for yaml configuration files. As such a pair of resources given as:

yaml_setting { 'example1_1':
  target => '/tmp/example1.yaml',
  key    => 'value/subkey/final',
  value  => ['one', 'two', 'three'],
}
yaml_setting { 'example1_2':
  target => '/tmp/example1.yaml',
  key    => 'value/subkey/other':
  value  => 'string',
}

should result in a file e.g. /tmp/example1.yaml:

value:
  subkey:
    final:
      - one
      - two
      - three
    other: string

Known Issues

Right now the type design doesn't allow for ruby symbols to be used as keys.

There are no tests.

puppet-module-yamlfile's People

Contributors

iivvaall avatar nanliu avatar reidmv avatar

Watchers

 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.