language-puppet-0.1.7: Tools to parse and evaluate the Puppet DSL.

Safe HaskellSafe-Infered



This module exports the getCatalog function, that computes catalogs from parsed manifests. The behaviour of this module is probably non canonical on many details. The problem is that most of Puppet behaviour is undocumented or extremely vague. It might be possible to delve into the source code or to write tests, but ruby is unreadable and tests are boring.

Here is a list of known discrepencies with Puppet :

  • Resources references using the | | syntax are not yet supported.
  • Things defined in classes that are not included cannot be accessed. In vanilla puppet, you can use subclass to classes that are not imported themselves.




:: (TopLevelType -> String -> IO (Either String Statement))

The "get statements" function. Given a top level type and its name it should return the corresponding statement.

-> (String -> String -> [(String, GeneralValue)] -> IO (Either String String))

The "get template" function. Given a file name, a scope name and a list of variables, it should return the computed template.

-> String

Name of the node.

-> Facts

Facts of this node.

-> IO (Either String FinalCatalog, [String])