Comments (9)
On 12.04 update-alternatives is distributed with dpkg. Don't have 14.04 so don't know if something changed there?
# dpkg -L dpkg | egrep 'bin.*alternatives'
/usr/bin/update-alternatives
/usr/sbin/update-alternatives
so basically alternatives are available with deb based distros out of the box.
from puppet-alternatives.
no, sorry. My explanation is not clear. It is the same in the two OS as in the package but I mean when it runs it gives an error. I mean as in, when you try to update the alternatives there are no alternatives available for Ruby in 14.04.... it is just 1.9.3 so it reports an error.
I will recreate it tonight and post with the error.
from puppet-alternatives.
Please do so before I decide to spent time on bringing up test env on ubuntu 14.04.
from puppet-alternatives.
So with the error from a vagrant machine:
Notice: /Stage[main]/Puppetmaster/Exec[update-alternatives --set gem /usr/bin/gem1.9.1]/returns: update-alternatives: error: no alternatives for gem
Error: update-alternatives --set gem /usr/bin/gem1.9.1 returned 2 instead of one of [0]
Error: /Stage[main]/Puppetmaster/Exec[update-alternatives --set gem /usr/bin/gem1.9.1]/returns: change from notrun to 0 failed: update-alternatives --set gem /usr/bin/gem1.9.1 returned 2 instead of one of [0]
Notice: /Stage[main]/Puppetmaster/Exec[update-alternatives --set ruby /usr/bin/ruby1.9.1]/returns: update-alternatives: error: no alternatives for ruby
Error: update-alternatives --set ruby /usr/bin/ruby1.9.1 returned 2 instead of one of [0]
Error: /Stage[main]/Puppetmaster/Exec[update-alternatives --set ruby /usr/bin/ruby1.9.1]/returns: change from notrun to 0 failed: update-alternatives --set ruby /usr/bin/ruby1.9.1 returned 2 instead of one of [0]
so if you could validate if the thing in this case ruby actually has an alternative before running that would be awesome.
from puppet-alternatives.
Can you provide me with code that generates these errors? ty
from puppet-alternatives.
holy shit. I am not even using your module for this (it's vagrant puppet run up, so I use minimal modules) and I did not think of it. I just assumed. I do use your module else where thou.
exec { 'update-alternatives --set ruby /usr/bin/ruby1.9.1':
unless => 'test /etc/alternatives/ruby -ef /usr/bin/ruby1.9.1',
path => '/usr/bin:/usr/sbin',
require => Package['ruby1.9.1-full'],
}
exec { 'update-alternatives --set gem /usr/bin/gem1.9.1':
unless => 'test /etc/alternatives/gem -ef /usr/bin/gem1.9.1',
path => '/usr/bin:/usr/sbin',
require => Package['ruby1.9.1-full'],
}
Apologies for the trouble/wrong assumption.
from puppet-alternatives.
No problem I like the bugs that resolve themselves out :)
from puppet-alternatives.
haha, yeah but now I feel like an idiot.
Enjoy your day. :)
from puppet-alternatives.
I now have a real world example:
==> tools01: Error: Execution of '/usr/sbin/update-alternatives --set gem /usr/bin/gem1.9.1' returned 2: update-alternatives: error: no alternatives for gem
==> tools01: Error: /Stage[main]/Profile_puppet/Alternatives[gem]/path: change from to /usr/bin/gem1.9.1 failed: Execution of '/usr/sbin/update-alternatives --set gem /usr/bin/gem1.9.1' returned 2: update-alternatives: error: no alternatives for gem
==> tools01: Error: Execution of '/usr/sbin/update-alternatives --set ruby /usr/bin/ruby1.9.1' returned 2: update-alternatives: error: no alternatives for ruby
==> tools01: Error: /Stage[main]/Profile_puppet/Alternatives[ruby]/path: change from to /usr/bin/ruby1.9.1 failed: Execution of '/usr/sbin/update-alternatives --set ruby /usr/bin/ruby1.9.1' returned 2: update-alternatives: error: no alternatives for ruby
and the puppet code:
ensure_resource('alternatives', 'ruby', {
path => '/usr/bin/ruby1.9.1',
require => Class['ruby'],
})
ensure_resource('alternatives', 'gem', {
path => '/usr/bin/gem1.9.1',
require => Class['ruby'],
})
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
- Using a full path for path is not always desirable. HOT 6
- 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.