Skip to content
Chef Cookbook to manage linux alternatives
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
libraries
recipes first commit Sep 19, 2016
spec
test
.foodcritic
.gitignore
.kitchen.dokken.yml
.kitchen.yml
.rspec
.rubocop.yml
.travis.yml
Berksfile
CHANGELOG.md
Gemfile
LICENSE
README.md
Rakefile
Thorfile
Vagrantfile
_config.yml
chefignore
metadata.rb

README.md

alternatives Cookbook

Cookbook Build Status

This is a Chef cookbook to manage Linux cmd alternatives using alternatives/update-alternatives.

For Production environment, always prefer the most recent release.

Most Recent Release

cookbook 'alternatives', '~> 0.2.0'

From Git

cookbook 'alternatives', github: 'vkhatri/chef-alternatives',  tag: "v0.2.0"

Repository

https://github.com/vkhatri/chef-alternatives

Supported Platforms

  • CentOS
  • Fedora
  • Amazon
  • Ubuntu
  • Debian

LWRP alternatives

LWRP alternatives install/remove/set/refresh/auto binary alternatives.

LWRP install alternative

alternatives 'python install 2' do
  link_name 'python'
  path '/usr/bin/python2.7'
  priority 100
  action :install
end

LWRP set alternative

alternatives 'python set version 3' do
  link_name 'python'
  path '/usr/bin/python3'
  action :set
end

LWRP auto alternative

alternatives 'python auto' do
  link_name 'python'
  action :auto
end

LWRP refresh alternative

alternatives 'python refresh' do
  link_name 'python'
  action :refresh
end

LWRP remove alternative

alternatives 'python remove' do
  link_name 'python'
  path '/usr/bin/python3'
  action :remove
end

LWRP Options

  • action (optional) - default :install, options: :install, :remove, :set, :auto, :refresh
  • link_name (optional, String) - default @name, alternatives link name
  • link (optional, String) - alternatives link
  • path (optional, String) - alternatives link path
  • priority (optional, String) - alternatives link path priority

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (like add_component_x)
  3. Write your change
  4. Write tests for your change (if applicable)
  5. Run the tests (rake & rake knife), ensuring they all pass
  6. Write new resource/attribute description to README.md
  7. Write description about changes to PR
  8. Submit a Pull Request using Github

Copyright & License

Authors:: Virender Khatri and Contributors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
You can’t perform that action at this time.