find_legacy_facts
A module containing a task and plan to scan entire code environments for legacy facts.
Table of Contents
- Description
- Setup - The basics of getting started with find_legacy_facts
- Usage - Configuration options and additional functionality
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Description
Puppet 8 by default no longer saves legacy facts to PuppetDB. This will case any Puppet manifest code to fail compilation if legacy facts are still in use after upgrading to Puppet 8.
For more information on legacy facts and what they are. See Legacy Facts
Setup
Beginning with find_legacy_facts
Add legacy facts to your Puppetfile and deploy code to your Puppet primary.
Legacy facts task and plan accepts two parameters.
Environment: Required: Name of the environment you wish to scan. This could be production, development etc. Note: the plan limits environment names to valid environment names.
check_ruby: Whether to scan ruby files for legacy facts. Note: local ruby functions/facts can still contain legacy facts as these are still collected on Puppet 8, however they are no longer submitted to PuppetDB.
The plan find_legacy_facts
will automatically locate your Puppet primary server. To manually target a Puppet server use the task find_legacy_facts
and select the desired target.
These plans should also function when run by Puppet Bolt.
Usage
From within the Puppet Enterprise console, goto plans or tasks and select find_legacy_facts
. Fill in required values then run the task/plan.
Depending on the size of your Puppet code environment, it may take a while to return the results.
Limitations
Find_legacy_facts can be used to help prepare for the migration to Puppet 8. However it should not solely relied upon to catch all legacy fact issues. Running your code on a Puppet 8 server within your test environment is vital before performing production upgrades.
Development
If you find any issues with this module, please log them in the issues register of the GitHub project. Issues
PR's glady accepted.