Skip to content

MODULES-8699: Add option to manage symlink#348

Merged
david22swan merged 1 commit intopuppetlabs:masterfrom
markt-de:symlink
Mar 6, 2019
Merged

MODULES-8699: Add option to manage symlink#348
david22swan merged 1 commit intopuppetlabs:masterfrom
markt-de:symlink

Conversation

@fraenki
Copy link
Copy Markdown
Contributor

@fraenki fraenki commented Feb 25, 2019

https://tickets.puppetlabs.com/browse/MODULES-8699

This adds the capability to java::oracle to manage a symlink for this version, which will point to the Java installation directory. This is useful because it adds a static path that will never change, no matter which Java version is currently in use.

java::oracle { 'jdk8':
  basedir => '/mnt'
  java_se => 'jdk'
  version_major => '8u201'
  version_minor => 'b09'
  url_hash => '42970487e3af4f5aa5bca3f542482c60'
  package_type => 'tar.gz'
  manage_symlink => true
  symlink_name => 'java_home'
}

Info: Applying configuration version '1551101640'
Notice: /Stage[main]/Java::Oracle[jdk8]/Archive[/tmp/jdk-8u201-linux-x64.tar.gz]/ensure: download archive from [...]
Notice: /Stage[main]/Java::Oracle[jdk8]/Exec[Install Oracle java_se jdk 8 8u201 b09]/returns: executed successfully
Notice: /Stage[main]/Java::Oracle[jdk8]/File[/mnt/java_home]/ensure: created

This feature is also available in puppet-jdk_oracle, which is no longer maintained and suggests to use puppetlabs-java instead.

I've added a test for this too:

java::oracle
  with CentOS 64-bit
    ...
    when manage_symlink is set to true
      should contain File[/usr/java/java_home]
    ...

@fraenki fraenki changed the title Add option to manage symlink MODULES-8699: Add option to manage symlink Feb 28, 2019
@david22swan
Copy link
Copy Markdown
Member

screen shot 2019-03-06 at 11 56 30 am

Have run the change through an adhoc pipeline and the changes themselves look good to me.

@david22swan david22swan merged commit fa7003d into puppetlabs:master Mar 6, 2019
@david22swan
Copy link
Copy Markdown
Member

@fraenki Thanks for putting in the work on this. Will try to get to your other PR soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants