373d21a744
Postgres-backed External Node Classifier for Puppet, replacing Cobbler. - encapi HTTP server (chi + pgx): read/write API + two ENC document shapes (reshaped for the exec terminus; cobbler-wire for enc_direct_facts.rb) - encapi-cli: classify/node/role/status CRUD + import-cobbler seeder - pkg/client Go SDK; unit tests across all packages (DB via testcontainers) - Dockerfile (distroless), Makefile, nfpm RPM (encapi-cli + encapi-enc wrapper), Woodpecker CI, docs/cutover.md
13 lines
459 B
Bash
Executable File
13 lines
459 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Puppet ENC entrypoint. Puppet's exec node_terminus invokes:
|
|
# external_nodes = /usr/local/bin/encapi-enc
|
|
# and calls it as `encapi-enc <certname>`. This shim forwards to
|
|
# `encapi-cli classify <certname>`, sourcing /etc/encapi/enc.conf for
|
|
# ENCAPI_URL (and, if reads were ever locked down, ENCAPI_WRITE_TOKEN).
|
|
set -euo pipefail
|
|
|
|
[ -r /etc/encapi/enc.conf ] && . /etc/encapi/enc.conf
|
|
|
|
exec /usr/local/bin/encapi-cli classify "$1"
|