Crates
Crates are functions that encapsulate some unit of configuration or administration. Every crate must take a first argument as a session map, and must return an updated session map. Crates can take other arguments.
Composing existing crates
The simplest way of creating a crate is to compose it from existing crates or actions.
(require 'pallet.action.package)
(require 'pallet.crate.git)
(require 'pallet.crate.tomcat)
(defn my-simple-config
[session]
(->
session
(pallet.action.package/package "maven2")
(pallet.crate.git/git)
(pallet.crate.tomcat/tomcat)))
Parameters
Delayed Arguments
Templates
Extending Pallet’s Actions
Creating actions
defaction can be used to define script producing functions, that can then be called in crates.
Aggregate action
defaggregate can be used to define actions that collect arguments over multiple invocations and emit a action based on the aggregated arguments. This is used in the sudoers crate, for example, to emit /etc/sudoers.
Local actions
def-clj-action defines a action that will be run on the local machine.
blog comments powered by Disqus