Version information
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet >= 3.0.0 < 7.0.0
- AIX, Debian, RedHat, CentOS, OracleLinux, Scientific, Solaris, SLES, SLED, Ubuntu
Start using this module
Add this module to your Puppetfile:
mod 'ghoneycutt-facter', '3.5.0'
Learn more about managing modules with a PuppetfileDocumentation
puppet-module-facter
===
Puppet module to manage Facter. To use simply include ::facter
.
===
Compatibility
This module is built for use with Puppet v3 (with and without the future
parse), v4 and v5 and supports Ruby versions 1.8.7, 1.9.3, 2.0.0, 2.1.9
and 2.4.1 on all POSIX like platforms. See .travis.yml
for an exact
matrix of tested Ruby and Puppet versions.
===
Parameters
manage_package
Boolean to manage the package resource. Not honored with Puppet 4 where it will be false since facter is included in the puppet-agent package.
- Default: true
package_name
String or Array of package(s) for facter.
- Default: 'facter'
package_ensure
String for ensure parameter to facter package.
- Default: present
manage_facts_d_dir
Boolean to manage the directory.
- Default: true
purge_facts_d
Boolean to delete unmanaged fact files from the facts.d directory.
- Default: false
facts_d_dir
Path to facts.d directory.
- Default: /etc/facter/facts.d
facts_d_owner
Owner of facts.d directory.
- Default: root
facts_d_group
Group of facts.d directory.
- Default: root
facts_d_mode
Four digit mode of facts.d directory.
- Default: 0755
path_to_facter
Path to facter to create symlink from. Required if ensure_facter_symlink is true.
- Default: '/usr/bin/facter'
path_to_facter_symlink
Path to symlink for facter. Required if ensure_facter_symlink is true.
- Default: '/usr/local/bin/facter'
ensure_facter_symlink
Boolean for ensuring a symlink for path_to_facter to symlink_facter_target. This is useful if you install facter in a non-standard location that is not in your $PATH.
- Default: false
facts_hash
Hash of facts to be passed to facter::fact with create_resources().
- Default: undef
facts_hash_hiera_merge
Boolean to control merges of all found instances of facter::facts_hash in Hiera. This is useful for specifying facts entries at different levels of the hierarchy and having them all included in the catalog.
- Default: false
facts_file
Filename under facts_d_dir
to place facts in
- Default: facts.txt
facts_file_owner
Owner of facts_file.
- Default: root
facts_file_group
Group of facts_file.
- Default: root
facts_file_mode
Four digit mode of facts_file.
- Default: 0644
===
Define facter::fact
Ensures a fact is present in the fact file with stdlib file_line() in fact=value format.
Usage
You can optionally specify a hash of external facts in Hiera.
facter::facts_hash: role: value: 'puppetmaster' location: value: 'RNB' file: 'location.txt'
The above configuration in Hiera would produce /etc/facter/facts.d/facts.txt
with the following content.
It would also produce /etc/facter/facts.d/location.txt
with the following content.
value
Value for the fact
- Required
fact
Name of the fact
- Default: $name
file
File under facts_dir
in which to place the fact.
- Default: 'facts.txt'
facts_dir
Path to facts.d directory.
- Default: '/etc/facter/facts.d'
v3.5.0 - 2019-01-03
Support Puppet v6
v3.4.0 - 2017-11-01
Support Puppet v5
v3.3.1 - 2017-07-17
Do not manage package with Puppet v4 as it uses the AIO and facter is part of the puppet-agent package.
v3.3.0 - 2016-11-18
Support Ruby 2.3.1
v3.2.0 - 2016-06-03
Support Puppet v4 w/ strict variables
v3.1.1 - 2016-01-13
Bugfix for hiera_merge when no facts are specified
v3.1.0 - 2015-12-11
Add ability to control hiera lookup method
v3.0.0 - 2015-11-04
This version will always manage the facts.txt. Also adds support for Puppet v4.
v2.1.0 - 2015-07-23
Add param to purge facts.d, support future parser
v2.0.0 - 2015-02-01
Changed facter::facts to facter::facts_hash as $facts is now reserved for use with trusted node data.
v1.3.2 - 2015-01-06
Support future parser
v1.3.1 - 2014-11-25
Fix cyclic dependency
v1.3.0 - 2014-09-22
Support external facts
v1.2.1 - 2014-08-06
Add ability to specify arbitrary string for package_ensure
v1.2.0 - 2014-04-29
Ability to specify a symlink to facter Support Puppet v3.5.1 Support Ruby v2.1.0 on Puppet v3.5.1
v1.1.2 - 2014-01-29
Support Puppet v3.4 and Ruby v2.0.0
v1.1.1 - 2014-01-23
Bugfix in error message
v1.1.0 - 2013-11-11
Add ability to toggle management of resources
v1.0.0 - 2013-11-10
First release
Dependencies
- puppetlabs/stdlib (>= 4.6.0 < 6.0.0)
Copyright (C) 2013-2019 Garrett Honeycutt <code@garretthoneycutt.com> 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.