-
-
Save DavidJFelix/495612c544cde3afd771 to your computer and use it in GitHub Desktop.
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
class java { | |
class { 'apt': } | |
# Add PPA | |
apt::ppa { 'ppa:webupd8team/java': } -> | |
# Install Java | |
package { 'oracle-java7-installer': | |
ensure => latest, | |
require => [ | |
Apt::Ppa['ppa:webupd8team/java'], | |
Exec['accept_java7_license'], | |
Exec['seen_java7_license'] | |
] | |
} | |
package { "oracle-java7-set-default": | |
ensure => latest, | |
require => [ | |
Apt::Ppa['ppa:webupd8team/java'], | |
Exec['accept_java7_license'], | |
Exec['seen_java7_license'] | |
] | |
} | |
exec { 'accept_java7_license': | |
command => '/bin/echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections' | |
} | |
exec { 'seen_java7_license': | |
command => '/bin/echo oracle-java7-installer shared/accepted-oracle-license-v1-1 seen true | /usr/bin/debconf-set-selections' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment