Never hardcode configuration values like IP addresses or package versions directly into your manifests. Use Hiera to keep your code "clean" and your data flexible.

Keep your logic in your profiles and your specific values in your Hiera YAML files. 3. Maintainable Module Design

These are the high-level descriptions of a machine's function (e.g., role::app_server ). A node should ideally have only one role . 2. Separation of Code and Data (Hiera)

Puppet Best Practices: Design Patterns for Maintainable Code

This is the "gold standard" for Puppet abstraction. It separates your technology-specific code from your business logic, making your codebase modular and readable.