Created
June 30, 2015 22:10
-
-
Save rafaelportela/a9410c68bf4d197f1579 to your computer and use it in GitHub Desktop.
Puppet script to install java automatically accepting licences
This file contains hidden or 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
file { '/etc/apt/sources.list.d/webupd8team.list': | |
content => "deb http://ppa.launchpad.net/webupd8team/java/ubuntu lucid main\ndeb-src http://ppa.launchpad.net/webupd8team/java/ubuntu lucid main\n", | |
} -> | |
exec { 'add-webupd8-key': | |
command => 'apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886', | |
path => ['/usr/bin/', '/bin'], | |
} -> | |
exec { 'apt-key-update': | |
command => 'apt-key update', | |
path => ['/usr/bin/', '/bin'], | |
} -> | |
exec { 'apt-update': | |
command => 'apt-get update', | |
path => ['/usr/bin/', '/bin'], | |
} -> | |
exec { 'accept-java-license': | |
command => '/bin/echo /usr/bin/debconf shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections;/bin/echo /usr/bin/debconf shared/accepted-oracle-license-v1-1 seen true | sudo /usr/bin/debconf-set-selections;', | |
} -> | |
package { 'oracle-java7-installer': | |
ensure => present, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment