[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Puppet module for cfengine
From: |
Luke Kanies |
Subject: |
Puppet module for cfengine |
Date: |
Sun, 6 Aug 2006 18:40:11 -0500 |
Hi all,
There has been a module for using Puppet[1] from within Cfengine for
a long time now, but I only just now got around to writing up a how-
to on it:
http://reductivelabs.com/projects/puppet/documentation/
cfengine_module.html
Basically, you can reuse your existing class structure within Puppet,
since the module will load all Puppet classes that are set within
Cfengine.
This is useful because Puppet supports many high-level types that are
difficult to manage within Cfengine, like users, groups, and
packages, and it also supports defined types that resemble functions
but create first-class Puppet types. For instance, this is how I
create the Apache configurations for my Trac sites:
define tracsite(path = "/etc/apache2/trac", owner) {
file { "trac-$name":
path => "/etc/apache2/trac/$name.conf",
owner => $owner,
group => root,
mode => 644,
require => file[apacheconf],
content => template("tracsite.erb"),
notify => service[apache2]
}
symlink { "tracsym-$name":
path => "/export/docroots/reductivelabs.com/cgi-bin/$name.cgi",
ensure => "/usr/share/trac/cgi-bin/trac.cgi"
}
}
Then I can call it as many times as I want:
tracsite { puppet: owner => apache }
This is actually an internal type that I use from within a larger
definition that actually creates the Trac database and configuration;
you can find it here:
http://prmweb.hezmatt.org/recipes/show/4
Feel free to contact me with any questions, or you can join the user
list[2] or #puppet in irc.freenode.net and look for me as lkanies (or
'laktop', sometimes).
1 - http://reductivelabs.com/projects/puppet
2 - https://mail.madstop.com/mailman/listinfo/puppet-users
--
Luke Kanies
http://madstop.com
615-594-8199
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Puppet module for cfengine,
Luke Kanies <=