Project

sapluuna

0.0
No commit activity in last 3 years
No release in over 3 years
Template based network configuration generator
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 10.0

Runtime

~> 4.0
 Project Readme

Sapluuna

Silly little template based configuration maker

  • Anything outside {{{ ... }}} is comment and won't be in generated file
  • Inside {{{ }}} you can have <% foo %> which is just ruby
  • For method_missing in <% foo %> we try variable[name] hash, given to constructor, i.e. Sapluuna.new variables: {replace_this: 'with_this'} .... <% replace_this %> works
  • {{{ can be followed by negative or positive labels, if labels match to those given to constructor {{{ }}} is evaluated, otherwise ignored
  • rationale for labels is {{{ PE ..... }}} or {{{ Finland Sweden ..... }}} to conditionally evaluate blocks
  • You can query the instance on what variables are needed when labels X are set, use-case is in say in webUI to automatically generate form with all variables template needs