class utils::java { # Java package { [ 'sun-java6-jre', 'openjdk-6-jre' ]: ensure => absent, } package { 'default-jre': ensure => present, } # Java alternative file { "/etc/alternatives/java": ensure => "/usr/lib/jvm/java-6-openjdk/jre/bin/java", owner => root, group => root, require => Package['sun-java6-jre'], } }