Created
July 10, 2014 21:26
-
-
Save pfigue/06997ae3afaf4050265c to your computer and use it in GitHub Desktop.
Puppet Manifest - Install Oracle's Java 8.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
forge "https://forgeapi.puppetlabs.com" | |
mod 'puppetlabs/apt', '1.5.1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Java. Using Oracle's Java 8 | |
class { 'apt': | |
always_apt_update => true, | |
} | |
apt::ppa { 'ppa:webupd8team/java': } | |
# Accept the contract agreement with Oracle | |
exec { 'accept_oracle_java_license': | |
command => 'echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections && echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections', | |
path => "/usr/bin/:/bin/", | |
#before => Package["oracle-java8-installer"], | |
logoutput => true, | |
} | |
# Install the package | |
package {['oracle-java8-installer',]: | |
ensure => installed, | |
require => [ | |
Apt::Ppa['ppa:webupd8team/java'], | |
Exec['accept_oracle_java_license'], | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment