Doing it wrong with Puppet
summary
Shows five concrete Puppet anti-patterns and fixes: Facter v1 stringifies booleans so facts returning false must be empty strings; avoid C-like 0/1 flags and use real Boolean parameters. Using defined() to dodge duplicate resources creates nondeterministic behavior; prefer a single wrapper class or the stdlib ensure_resource with caution. Replacing declarative state with long chains of execs and heavy use of refreshonly breaks idempotence and debugging; package the installer or run a single guarded exec. Relying on dynamic scoping (resource defaults) makes behavior order-dependent; prefer class parameters and Hiera.
AI-written summary · about
