Skip to content

Instantly share code, notes, and snippets.

@philchristensen
Created May 29, 2015 19:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philchristensen/2456f322a3232ef76b88 to your computer and use it in GitHub Desktop.
Save philchristensen/2456f322a3232ef76b88 to your computer and use it in GitHub Desktop.
Puppet Java manifest
exec { "accept-oracle-license":
command => "/bin/echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections",
unless => "/usr/bin/debconf-get-selections | /bin/grep shared/accepted-oracle-license-v1-1"
}->
apt::ppa { "ppa:webupd8team/java": }
ensure_packages(['oracle-java7-installer', 'tomcat7'], {
require => Apt::Ppa['ppa:webupd8team/java']
})
file { "/usr/lib/jvm/default-java":
ensure => link,
target => "/usr/lib/jvm/java-7-oracle",
require => Package['oracle-java7-installer'],
notify => Service["tomcat7"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment