acaiafa / rc-cookbook

Library cookbook which provides a resource for writing runtime configuration files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rc-cookbook

Library cookbook which provides a resource for writing runtime configuration files.

A runtime configuration file can come in many flavors, but ultimately the purpose is to manage them using a simple resource. The only type which is provided by default is a bash runtime configuration which is simply a key-value pair.

Any new types can be added by modifying the resource (adding a type) and writing the appropriate erb template.

The example which is used for testing purposes is writing out an bashrc skeleton file which manages HTTP proxies.

rc_file '/etc/skel/bashrc' do
  options(
    'http_proxy' => 'http://proxy.corporate.com:80',
    'https_proxy' => 'http://proxy.corporate.com:443',
    'ftp_proxy' => 'http://proxy.corporate.com:80',
    'no_proxy' => 'localhost,127.0.0.1'
  )
end

About

Library cookbook which provides a resource for writing runtime configuration files.

License:Other


Languages

Language:Ruby 89.1%Language:HTML 10.9%