Skip to content

Instantly share code, notes, and snippets.

@hameno
Created January 2, 2014 13:29
Show Gist options
  • Save hameno/8219185 to your computer and use it in GitHub Desktop.
Save hameno/8219185 to your computer and use it in GitHub Desktop.
Dependencies: puppetlabs/apt
class java {
class { 'apt': }
# Add PPA
apt::ppa { 'ppa:webupd8team/java': } ->
# Prepare response file
file { "/tmp/oracle-java7-installer.preseed":
source => 'puppet:///modules/java/java.response',
mode => 600,
backup => false,
} ->
# Install Java
package { "oracle-java7-installer":
ensure => "installed",
responsefile => '/tmp/oracle-java7-installer.preseed'
} ->
package { "oracle-java7-set-default": ensure => "installed" }
}
oracle-java7-installer shared/accepted-oracle-license-v1-1 select true
oracle-java7-installer shared/accepted-oracle-license-v1-1 seen true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment