-
PUPPET_EXPR_DOT- Method calls ($array.each,$string.length) -
PUPPET_EXPR_LAMBDA- Lambdas/closures (|$x| { ... }) - Expression-body lambdas (
|$x| { $x * 2 })
-
PUPPET_STMT_DEFINE- Defined types (define mytype($param) { }) - [~]
PUPPET_STMT_RESOURCE_DEFAULT- Resource defaults (File { mode => '0644' }) - parsed, not applied -
PUPPET_STMT_RESOURCE_OVERRIDE- Resource override (File['/x'] { attr => val }) -
PUPPET_STMT_RESOURCE_COLLECTOR- Virtual collectors (File <| ensure == present |>) -
PUPPET_STMT_RESOURCE_CHAIN- Ordering arrows (Package['x'] -> Service['y']) -
PUPPET_STMT_APPEND- Array/hash append ($arr += ['value'],$hash += {key => val}) -
PUPPET_STMT_REQUIRE-require class_name -
PUPPET_STMT_CONTAIN-contain class_name -
PUPPET_STMT_TAG-tag 'tagname'(applies tags to resources in scope)
- Virtual resources (
@resourcesyntax) -
realize()function - Virtual resource collectors (
<| |>with filters) - Exported resources (
@@resourcesyntax) - stored to PuppetDB - Exported resource collectors from PuppetDB (
<<| |>>)
-
requiremetaparameter (ordering) -
beforemetaparameter (ordering) -
notifymetaparameter (ordering + refresh) -
subscribemetaparameter (ordering + refresh) - Refresh triggers (service restart, exec refresh)
-
refreshonlyparameter for exec resources
- Type aliases (
type MyType = String[1]) - Abstract types (
Variant,Optional,Enum, etc.) - Type validation on parameters
- [~] Sensitive type - Basic pass-through implemented, needs:
- Sensitive value wrapper type (mask data in logs/output)
- Compiler: Redact Sensitive values in catalog JSON
- Server: Mask Sensitive values in stored catalogs/reports
- Agent: Handle Sensitive values during application
- ERB templates — native C engine for the common subset (instance vars,
scope.lookupvar/scope[], indexing, comments,<%-/-%>trim markers), embedded Ruby fallback for the rest. Cached AST shared across nodes. - EPP templates (Embedded Puppet)
The native renderer (compiler/puppet_erb_native.c) currently covers ~2/3 of templates seen in our corpus; the rest hit the Ruby fallback. Plausible additions in order of payoff vs. complexity:
-
"#{expr}"interpolated strings (single-line, no nested blocks) - Boolean / comparison operators in expressions (
==,!=,<,<=,>,>=,&&,||,!) -
<% if EXPR %> ... <% else %> ... <% end %>conditional blocks -
.length,.size,.empty?,.to_smethod calls on supported types -
<% @arr.each do |x| %> ... <% end %>loops (most common remaining shape)
- ~100 stdlib functions implemented
-
each(),map(),filter(),reduce()iterators -
create_resources()function -
deep_merge(),delete_undef_values()hash functions -
prefix(),suffix(),union(),intersection(),difference()array functions -
zip(),count(),shuffle()array utilities -
swapcase(),squeeze(),shell_split()string functions -
clamp()numeric function -
any2bool(),bool2num(),num2bool()type conversions - Custom function definitions (
function mymod::myfunc() {}) -
with()function -
assert_type()function -
loadyaml(),parseyaml(),loadjson(),parsejson()data loading
- file
- exec
- notify
- package (apt/dpkg)
- service (systemd)
- cron
- host
- user
- group
- sysctl
- mount
- augeas - Configuration file editing
- ssh_authorized_key - SSH public keys
- firewall - iptables/nftables rules
- mailalias - Mail aliases
- package: Support yum, dnf, zypper
- package: Version pinning (
ensure => '1.2.3') - service: Support SysV init, OpenRC
- file: Recursive directory management
- file:
purgeparameter
- SSL/TLS encryption (TLS 1.2+, HTTPS endpoints)
- Client certificate authentication (mTLS with X.509)
- Certificate Authority (CA) infrastructure
- CSR signing workflow
- Auto-signing (policy/whitelist/naive modes)
- SQLite database backend
- Store facts on catalog request
- Store catalogs
- Query nodes (
/pdb/query/v4/nodes) - Query facts (
/pdb/query/v4/facts/<certname>) - Query catalogs (
/pdb/query/v4/catalogs/<certname>) - Store/query exported resources
- Exported resource collectors (
<<| |>>)
- Multiple environment support
- Environment isolation
- mTLS client authentication with certificate validation
- Automatic CSR generation and submission workflow
- Certificate storage with secure file permissions (0600 for keys)
- HTTPS-only communication with server
- Certificate validation (hostname, chain, expiry)
- Report processor
- Report submission to server
- Background daemon with interval
- Lock file handling
-
--tagsfiltering -
--environmentselection - Pluginsync
- Cloud provider facts (AWS, GCP, Azure)
- Docker/container facts
- Disk facts (partitions, usage)
- Custom facts from modules
- External facts (executable, JSON, YAML)
- YAML backend
- Basic hierarchy
-
lookup()function
- JSON backend
- eYAML (encrypted YAML)
- Deep merge strategies
-
hiera_include()function
- Parser unit tests
- Docker integration tests
- Stdlib function tests (
tests/test_stdlib_extra.sh) - Multi-suite check targets: parallel-consistency, multinode-isolation, class-loader, hiera-advanced, catalog-refs, source-URL, unknown-type, template-fidelity
- Memory leak testing (Valgrind) —
make check-valgrindwith suppressions for libruby/libssl/libtree-sitter init noise - Native-vs-Ruby ERB parity test — render a fixed template set with both engines, assert byte-for-byte equality (today
template-fidelityonly checks Ruby vs reference) - Performance benchmarks (in tree, with reproducible corpus)
- Coverage reporting
- Pull shared, read-mostly state into
puppet_program_state_t(loader, facts_db, data providers, deadcode tracker, top-level statements, ruby type registries, skip_erb, verbose). Per-nodepuppet_env_tnow holds a pointer +owns_progflag, cloned envs share the sameprog. - Decouple ERB skip from
-Pmode. Native ERB engine renders the common subset thread-safely; templates outside the subset are marshalled to a single Ruby daemon thread (puppetresources-style — seePuppet/Runner/Erb.hs::templateDaemon). libruby is only ever called from that one OS thread, so-Pis safe and faithful.skip_erbis now an explicit opt-in only.
- Split per-compile state into a dedicated
puppet_compile_t(resources collected during this node's compile, scope chain, virtual/exported pools, deferred function calls). Todaypuppet_env_clone_for_nodeshares some pointers it shouldn't. - Re-attempt moving class/define/node registries to shared
prog. The earlier attempt segfaulted because the hash carriers point into AST other workers may inspect — needs either a deep-copy boundary or a per-compile registry layered over a shared one.
- Drop or revisit the
// TODO Phase 1Fcomments incompiler/puppet_interpreter.cleft from the reverted Phase 1F migration (class_definitions / define_types / node_definitions to sharedprog). - The native ERB cache is unbounded and never freed (lifetime = process). Fine for one-shot CLI runs but
puppetc-serverwill need an eviction policy if it ever serves many distinct templates.
- Debian packages
- RPM packages
- Docker Hub images