Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
TomEE with Puppet
# update the (outdated) package list
exec { "update-package-list":
command => "/usr/bin/sudo /usr/bin/apt-get update",
}
class java_6 {
package { "openjdk-6-jdk":
ensure => installed,
require => Exec["update-package-list"],
}
}
class tomee {
file {"/opt/tomee-1.5.1":
ensure => directory,
recurse => true,
} ->
exec { "download-tomee" :
command => "/usr/bin/wget http://apache.rediris.es/openejb/openejb-4.5.1/apache-tomee-1.5.1-webprofile.tar.gz -O /tmp/tomee-1.5.1.tar.gz",
creates => "/tmp/tomee-1.5.1.tar.gz",
} ->
exec { "unpack-tomee" :
command => "/bin/tar -xzf /tmp/tomee-1.5.1.tar.gz -C /opt/tomee-1.5.1 --strip-components=1",
creates => "/opt/tomee-1.5.1/bin",
}
service { "tomee" :
provider => "init",
ensure => running,
start => "/opt/tomee-1.5.1/bin/startup.sh",
stop => "/opt/tomee-1.5.1/bin/shutdown.sh",
status => "",
restart => "",
hasstatus => false,
hasrestart => false,
require => Exec["unpack-tomee"],
}
}
include java_6
include tomee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.