Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/voxpupuli/puppet-boolean
An actual Boolean property for Puppet
https://github.com/voxpupuli/puppet-boolean
centos-puppet-module debian-puppet-module hacktoberfest linux-puppet-module puppet redhat-puppet-module scientific-puppet-module ubuntu-puppet-module
Last synced: 3 months ago
JSON representation
An actual Boolean property for Puppet
- Host: GitHub
- URL: https://github.com/voxpupuli/puppet-boolean
- Owner: voxpupuli
- License: apache-2.0
- Archived: true
- Created: 2012-12-12T07:13:19.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2023-04-28T12:08:06.000Z (over 1 year ago)
- Last Synced: 2024-04-13T23:10:38.224Z (9 months ago)
- Topics: centos-puppet-module, debian-puppet-module, hacktoberfest, linux-puppet-module, puppet, redhat-puppet-module, scientific-puppet-module, ubuntu-puppet-module
- Language: Ruby
- Homepage: https://forge.puppet.com/puppet/boolean
- Size: 134 KB
- Stars: 7
- Watchers: 45
- Forks: 21
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
puppet-boolean
==============**This module is archived! Do not use it anymore**
The discussion happened in https://github.com/voxpupuli/puppet-boolean/issues/34
Define actual boolean parameters and properties for puppet types.
Synopsis
--------Puppet has loosely defined internal types which can make normalizing boolean
values in types and providers difficult. This custom parameter and property
will handle that normalization in one place by defining actual boolean states.Example
-------**Type implementation**:
require 'puppet/property/boolean'
Puppet::Type.newtype(:awesome) do
newparam(:name, :namevar => true)
newparam(:more_explosions, :parent => Puppet::Parameter::Boolean) do
desc "Indicate that more explosions are necessary"
defaultto true # When it doubt, we want more explosions
endnewproperty(:better_than_sliced_bread, :parent => Puppet::Property::Boolean) do
desc "Determine if the thing is more awesome than sliced bread"
defaultto true # It's not hard to be more awesome than sliced bread
endnewproperty(:better_than_rocket_boots, :parent => Puppet::Property::Boolean) do
desc "Determine if the thing is more often than rocket boots"
defaultto false # Rocket boots are pretty hard to beat
endnewproperty(:will_get_you_eaten_by_sharks, :parent => Puppet::Property::Boolean) do
desc "Determine if this is so awesome that it'll get you eaten by sharks"
defaultto :false # Use a symbol for the default value and it'll still be false
endnewproperty(:suitable_for_human_consumption, :parent => Puppet::Property::Boolean) do
desc "Determine if the thing is both awesome and edible"
defaultto :false # The are more non-edible things than edible things
end
end**Type usage**:
awesome { 'actual booleans':
more_explosions => 'yes', # Use yes as a quoted string!
better_than_rocket_boots => true, # Use an unquoted string!
better_than_sliced_bread => 'true', # Use a quoted string!
suitable_for_human_consumption => no, # Use yes and no! It doesn't matter!
}Contact
-------* source code: https://github.com/adrienthebo/puppet-boolean
* issue tracker: https://github.com/adrienthebo/puppet-boolean/issues