This plugin is meant to replace the previously used (with success) exec type for managing GlassFish domains:
$passfile = "/home/gfish/.aspass"
$portbase = "4900"
$asadmin = "/opt/NSBglassfish/bin/asadmin"
$domaindir = "/opt/NSBglassfish/glassfish/domains"
exec {
"create-domain-$name":
command => "$asadmin --user admin --passwordfile $passfile create-domain --profile cluster --portbase $portbase --savelogin $name",
user => "admin",
creates => "$domaindir/$name";
}
his new resource type allows for more functionality and expressive clarity than the exec type. For example, it allows you to easily delete the domain by using the
ensure => absent property. This is how  one specifies a new GlassFish domain with this:glassfish {
    "mydomain":
        portbase => "4800",
        adminuser => "admin",
        passwordfile => "/home/gfish/.aspass",
        profile => "cluster",
        ensure => present;
    "myolddomain":
        ensure => absent;
}I plan to add more features to it, such as adding system-properties and jvm-options.
 
1 kommentar:
Using Puppet to build a Glassfish server « The Software Configuration Revolution Blog
Legg inn en kommentar