Version information
released Aug 21st 2014
This module has been deprecated by its author since Oct 5th 2022.
The author has suggested puppet-alternatives as its replacement.
Start using this module
Documentation
adrien/alternatives — version 0.2.0 Aug 21st 2014
puppet-alternatives
Manage debian alternatives symlinks.
Synopsis
Using puppet resource
to inspect alternatives
root@master:~# puppet resource alternatives
alternatives { 'aptitude':
path => '/usr/bin/aptitude-curses',
}
alternatives { 'awk':
path => '/usr/bin/mawk',
}
alternatives { 'builtins.7.gz':
path => '/usr/share/man/man7/bash-builtins.7.gz',
}
alternatives { 'c++':
path => '/usr/bin/g++',
}
alternatives { 'c89':
path => '/usr/bin/c89-gcc',
}
alternatives { 'c99':
path => '/usr/bin/c99-gcc',
}
alternatives { 'cc':
path => '/usr/bin/gcc',
}
Using puppet resource
to update an alternative
root@master:~# puppet resource alternatives editor
alternatives { 'editor':
path => '/bin/nano',
}
root@master:~# puppet resource alternatives editor path=/usr/bin/vim.tiny
notice: /Alternatives[editor]/path: path changed '/bin/nano' to '/usr/bin/vim.tiny'
alternatives { 'editor':
path => '/usr/bin/vim.tiny',
}
Using the alternatives resource in a manifest:
class ruby::193 {
package { 'ruby1.9.3':
ensure => present,
}
# Will also update gem, irb, rdoc, rake, etc.
alternatives { 'ruby':
path => '/usr/bin/ruby1.9.3',
require => Package['ruby1.9.3'],
}
}
# magic!
include ruby::193
This module should work on any Debian based distribution, or really any
distribution that has a reasonable update-alternatives
file.
Contact
- Source code: https://github.com/adrienthebo/puppet-alternatives
- Issue tracker: https://github.com/adrienthebo/puppet-alternatives/issues
If you have questions or concerns about this module, contact finch on #puppet on Freenode, or email adrien@puppetlabs.com.
Types in this module release
CHANGELOG
0.2.0
- New type: alternative_entry
- The alternatives type now has the
mode
property to use the automatic option for a given alternative.
- The update-alternatives binary is no longer hardcoded to use /usr/sbin/update-alternatives
Thanks
Thanks to Michael Moll and jakov Sosic for their work on this release.
0.1.1
This is a backwards compatible bugfix release.
- Module rebuilt with correct permissions.
Copyright 2013 Adrien Thebo 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.