Comments (6)
Workaround:
exec{'jdk8':
command => '/usr/bin/alternatives --set java java-1.8.0-openjdk.x86_64',
unless => '/usr/bin/readlink /etc/alternatives/java | /usr/bin/grep -q /java-1.8.0-openjdk-1.8.0'
}
from puppet-alternatives.
Are there any news?
from puppet-alternatives.
Just hit this as well. Upvote, FWIW.
from puppet-alternatives.
Just added a PR to simply remove the validation line. Don't know that there's a great solution to also looking at "families", but I haven't dug into the alternatives system much. A quick look appears that the "family" thing is not a term mentioned in the man pages. But as the OP and I have discovered, it does seem to work for the JDK, at least.
I'm able to use update-alternatives --set java java-latest-openjdk.x86_64
successfully, and with the code change, I can use this in the manifest:
alternatives { 'java':
mode => 'manual',
path => 'java-latest-openjdk.x86_64',
}
from puppet-alternatives.
...and, as with all things, it turned out not to be that simple, of course. :D
Since my setup doesn't need to have multiple jdk's installed, I'm going to punt, but it would be great if this could work. I'll look at it more as I get time, but for now, my PR just results in puppet setting the alternative every run, which is obviously not desired.
from puppet-alternatives.
Would be great if this could be fixed.
Here is a workaround for Java 11 under RHEL 7:
alternative_entry {'/usr/lib/jvm/jre-11-openjdk/bin/java':
ensure => present,
altlink => '/usr/bin/java',
altname => 'java',
priority => 999999,
require => Package['java-11-openjdk-headless'],
}
alternatives { 'java':
path => '/usr/lib/jvm/jre-11-openjdk/bin/java',
require => Alternative_entry['/usr/lib/jvm/jre-11-openjdk/bin/java'],
}
This adds an entry with a static path using the already available link under /usr/lib/jvm
from puppet-alternatives.
Related Issues (20)
- SLES 12 and 15 do not work with puppet-alternatives HOT 2
- Support slave links HOT 1
- No new version on Puppet Forge since 2019 HOT 2
- Could not determine mode after upgrade to 4.1.0
- Error: Could not autoload puppet/provider/alternatives/chkconfig HOT 1
- Could not evaluate: undefined method `[]' for nil:NilClass HOT 7
- Add support for Puppet 8 HOT 1
- Warnings when using Module HOT 1
- Missing provider for AWS Linux
- manual install HOT 2
- How does one set alternative entry back to 'auto' mode? HOT 2
- Release to forge HOT 3
- plugin sync error? HOT 3
- alternative_entry keying to the wrong parameter?
- seting multiple alternatives to the same path HOT 6
- Debian 6 with Ruby 1.8.7 broken HOT 3
- missing alternatives is not added - it breaks instead HOT 3
- check debian support
- Could not determine auto or manual mode
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-alternatives.