New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(CONT-356) Syntax update #543
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1 @@ | ||
--relative | ||
--no-parameter_types-check | ||
--no-relative_classname_inclusion-check | ||
--no-legacy_facts-check | ||
--no-anchor_resource-check |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,15 +36,15 @@ | |
# environment variable. | ||
# | ||
class java ( | ||
String $distribution = 'jdk', | ||
Pattern[/present|installed|latest|^[.+_0-9a-zA-Z:~-]+$/] $version = 'present', | ||
Optional[String] $package = undef, | ||
Optional[Array] $package_options = undef, | ||
Optional[String] $java_alternative = undef, | ||
Optional[String] $java_alternative_path = undef, | ||
Optional[String] $java_home = undef | ||
String $distribution = 'jdk', | ||
Pattern[/present|installed|latest|^[.+_0-9a-zA-Z:~-]+$/] $version = 'present', | ||
Optional[String] $package = undef, | ||
Optional[Array] $package_options = undef, | ||
Optional[String] $java_alternative = undef, | ||
Optional[String] $java_alternative_path = undef, | ||
Optional[String] $java_home = undef | ||
) { | ||
include ::java::params | ||
contain java::params | ||
|
||
$default_package_name = has_key($java::params::java, $distribution) ? { | ||
false => undef, | ||
|
@@ -118,12 +118,10 @@ | |
} | ||
} | ||
|
||
anchor { 'java::begin:': } | ||
-> package { 'java': | ||
package { 'java': | ||
ensure => $version, | ||
install_options => $package_options, | ||
name => $use_java_package_name, | ||
} | ||
-> class { 'java::config': } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
-> anchor { 'java::end': } | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why
contain
here instead ofinclude
(consideringjava::params
doesn't declare any resources and only sets variables).