Last active
August 29, 2015 14:16
-
-
Save greglarkin/e4be053ec3a4a37fb444 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 jdktest ( | |
$versions = $jdktest::params::versions, | |
) inherits jdktest::params { | |
$package_names = prefix($versions, 'openjdk') | |
validate_array($versions) | |
validate_array($package_names) | |
contain jdktest::install | |
} |
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 jdktest::install inherits jdktest { | |
if ! ($versions) { | |
fail("You didn't provide any jdk versions to be installed") | |
} | |
validate_array($versions) | |
validate_array($package_names) | |
package { $package_names: | |
ensure => present, | |
} | |
} |
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 jdktest::params { | |
$versions = [ '7' ] | |
} |
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
include jdktest |
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 { 'jdktest': | |
versions => '7', | |
} |
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 { 'jdktest': | |
versions => [ '7' ], | |
} |
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 { "jdktest": | |
versions => [ '7', '8' ], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment