Version information
released Dec 25th 2016
This version is compatible with:
- Puppet Enterprise 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet >= 3.8.7 < 5.0.0
- , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'puppet-alternatives', '1.0.2'
Learn more about managing modules with a PuppetfileDocumentation
puppet/alternatives — version 1.0.2 Dec 25th 2016
puppet-alternatives
Manage 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
Creating a new alternative entry:
alternative_entry {'/usr/bin/gcc-4.4':
ensure => present,
altlink => '/usr/bin/gcc',
altname => 'gcc',
priority => 10,
require => Package['gcc-4.4-multilib'],
}
This module should work on any Debian and RHEL based distribution.
Contact
Types in this module release
Changelog
2016-12-25 Release 1.0.2
- Modulesync with latest Vox Pupuli defaults
- Fix ALT_RPM_QUERY_REGEX to catch all entries and not only the default ones
- Add Spectest for rpm provider
2016-08-12 Release 1.0.1
- Modulesync with latest Vox Pupuli defaults
- Drop of ruby183 support
- new aternative_entry with rpm provider
- Enable explicitly setting mode property to manual
- First release under the Voxpupuli namespace! Migrated from Adrien Thebo
- Rerelease of 1.0.0, which didn't make it to the forge
2014-12-19 Release 0.3.0
- New RPM based providers for alternatives and alternative_entry
- Debian based distributions use
update-alternatives
based on $PATH - The alternatives type now autorequires matching alternate_entry types
- dpkg provider explicitly sets the mode property to manual
- alternative_entry can check for alernative entries for a non-existent entry
2014-08-21 Release 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.
2013-07-16 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.