Created
March 27, 2013 19:00
-
-
Save arusso/5257049 to your computer and use it in GitHub Desktop.
Update hosts to use java-1.7.0-oracle via Puppet
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
# Ensure Java 1.7 is installed | |
package { 'java-1.7.0-oracle': ensure => installed } | |
# update alternatives only if it's not set correctly already | |
exec { 'alternatives --set java \ | |
/usr/lib/jvm/jre-1.7.0-oracle.x86_64/bin/java': | |
unless => "test $(readlink /etc/alternatives/java) == \ | |
'/usr/lib/jvm/jre-1.7.0-oracle.x86_64/bin/java'", | |
require => Package['java-1.7.0-oracle'], | |
path => ['/bin','/usr/sbin','/usr/bin'], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment