This is a [Chef Infra] cookbook to manage Linux cmd alternatives using alternatives/update-alternatives.
For Production environment, always prefer the most recent release.
cookbook 'alternatives', '~> 0.3.0'
cookbook 'alternatives', github: 'vkhatri/chef-alternatives', tag: "v0.3.0"
https://github.com/vkhatri/chef-alternatives
alternatives
resource to install/remove/set/refresh/auto binary alternatives.
install alternatives
alternatives 'python install 2' do
link_name 'python'
path '/usr/bin/python2.7'
priority 100
action :install
end
set alternative
alternatives 'python set version 3' do
link_name 'python'
path '/usr/bin/python3'
action :set
end
auto alternative
alternatives 'python auto' do
link_name 'python'
action :auto
end
refresh alternative
alternatives 'python refresh' do
link_name 'python'
action :refresh
end
remove alternative
alternatives 'python remove' do
link_name 'python'
path '/usr/bin/python3'
action :remove
end
Resource Actions
Resource Properties
@name
, alternatives link nameadd_component_x
)rake & rake knife
), ensuring they all passREADME.md
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.