find_legacy_facts
Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2021.7.x
- Puppet >= 7.24 < 9.0.0
- , ,
Tasks:
- find_legacy_facts
Plans:
- find_legacy_facts
Start using this module
Add this module to your Puppetfile:
mod 'benjaminrobertson-find_legacy_facts', '1.0.0'
Learn more about managing modules with a PuppetfileDocumentation
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.
Reference
Table of Contents
Tasks
init
: Puppet task which scans entire code environments for legacy facts. Must be run against a Puppet Server with a full copy of the Puppet environ
Plans
find_legacy_facts::find_legacy_facts
: Puppet plan which scans entire code environments for legacy facts. Will automatically locate the Puppet primary and run against it.
Tasks
init
Puppet task which scans entire code environments for legacy facts. Must be run against a Puppet Server with a full copy of the Puppet environment you wish to scan. EG Primary, replica or compiler.
Supports noop? false
Parameters
environment
Data type: String[1]
Code environment to scan.
check_ruby
Data type: Boolean
Whether to check ruby files for legacy facts.
environment_path
Data type: Optional[String]
Path to Puppet environment, EG where Puppet code is deployed on primary.
Plans
find_legacy_facts::find_legacy_facts
lint:ignore:140chars lint:ignore:strict_indent
Parameters
The following parameters are available in the find_legacy_facts::find_legacy_facts
plan:
environment
Data type: Pattern[/^[a-z0-9_]+/]
Code environment to scan.
check_ruby
Data type: Boolean
Whether to check 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.
Default value: false
What are tasks?
Modules can contain tasks that take action outside of a desired state managed by Puppet. It’s perfect for troubleshooting or deploying one-off changes, distributing scripts to run across your infrastructure, or automating changes that need to happen in a particular order as part of an application deployment.
Tasks in this module release
What are plans?
Modules can contain plans that take action outside of a desired state managed by Puppet. It’s perfect for troubleshooting or deploying one-off changes, distributing scripts to run across your infrastructure, or automating changes that need to happen in a particular order as part of an application deployment.
Changelog
All notable changes to this project will be documented in this file.
Release 1.0.0
Features
- Updated plan and task to work with lockless code deploys. find_legacy_facts dynamically locates environment directory using facts and configuration files. #2
- Added github actions lint testing.
- Bumped PDK version.
Release 0.2.0
Bugfixes
- Fixed minor documentation issues.
Release 0.1.0
Features
- First release
Bugfixes
Known Issues