Version information
Start using this module
Add this module to your Puppetfile:
mod 'caezs-fact', '0.2.1'
Learn more about managing modules with a PuppetfileDocumentation
fact
Table of Contents
- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with fact
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
- License
Overview
Create simple facts within receipts.
Module Description
This module provides a new type called fact. With this type simple key = value
facts can be created on the fly without any knowledge about custom facts.
Setup
Installing the module is sufficient. There is no need to include the module.
Usage
To create a custom fact use the fact type as follows:
fact { "factname": value => "factvalue" }
Reference
This module only depends on stdlib.
[ensure]
Whether the fact is to be present or not. Possible values are:
present
will create the fact file.absent
will make sure the fact file doesn't exist.
Defaults to present
.
[key]
The name of the fact. This has to be a character, number or underscore. Defaults to the title.
[value]
The value of the fact. No default set.
Limitations
Should be working with all linux, bds and mac distributions that come with an /etc
directory.
Development
- Fork it
- Change it
- Merge it
...or feel free to contact me for suggestions. You may also use the issues section for suggestions or bugs.
License
Please see the LICENSE file.
Changelog
0.1.1 (19.09.2014)
Changes
- [Feature] Added ensure parameter for removing facts.
- [Fix] Fixed error where 2 facts could not be deployed cause puppet wanted to create the
/etc/facter/facts.d
path again and would not allow it. - [Test] Added smoke test for an absent fact.
0.1.0 (18.09.2014)
Changes
- Module init
Dependencies
- puppetlabs-stdlib (>= 1.0.0)
Copyright 2014 caezs 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.