Skip to content

Package resource type #45

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

Merged
merged 17 commits into from
Aug 10, 2015
Merged

Conversation

pulquero
Copy link
Contributor

Refactored to create a 'package' resource type so it is possible to install multiple jdk versions.

Example:
jdk_oracle::package {
'jdk6':
version => '6',
create_symlink => false,
default_java => false;
'jdk7':
version => '7'
}

Changes:
contents of init.pp moved to package.pp and resource titles made unique by addition of _${version} where necessary.

@tylerwalts
Copy link
Owner

Thanks, generally this is a great idea, especially for use cases like configuring a CI build server. There is another fork out there that just converted it from a class to a define in the main init.pp, but no PR was done:

https://github.com/burdara/puppet-jdk_oracle/blob/master/manifests/init.pp

A few feedback items:

  • For the naming, I feel like package.pp is somewhat misleading since we are installing intentionally from tarball vs using a OS package.
    • Could we call it something more generic, like install.pp?
  • Tests are not passing
    • Not sure right now if it was caused by your commits or some other issue?


}

jdk_oracle::package { 'jdk_oracle':
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this now be: jdk_oracle::install ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

@tylerwalts
Copy link
Owner

This seems like a breaking change and people may have to update their references to use it as a define now vs a class (exa: hiera users), so it feels like this should be a major 2.0.0 release, to make it clear that change will happen. Agree/disagree?

Corrected jdk_oracle::package to jdk_oracle::install
@pulquero
Copy link
Contributor Author

pulquero commented Aug 7, 2015

I disagree, the original class definition is still there, so anybody still using it should not be affected. But, I'm not a puppet expert, so don't know if I'm overlooking something.

@tylerwalts
Copy link
Owner

Good point, we have the original class with parameters which remain unchanged, so it would be the implementer's option to call the define directly, or not.

tylerwalts added a commit that referenced this pull request Aug 10, 2015
@tylerwalts tylerwalts merged commit 8b2fd49 into tylerwalts:master Aug 10, 2015
@coveralls
Copy link

coveralls commented Feb 24, 2017

Coverage Status

Changes Unknown when pulling 94768a5 on pulquero:package-resource-type into ** on tylerwalts:master**.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants