Skip to main content
Certplane ships two Ansible roles in the ansible/ directory of the source repo:
  • certplane_broker — installs the broker binary, lays out config and TLS material, deploys the policy file, and manages the systemd service.
  • certplane_agent — installs the agent binary, deploys CA bundles and config, performs first-time enrollment with a bootstrap token, and manages the systemd timer.
Both roles target Debian Bookworm and Ubuntu Jammy/Noble out of the box.

Layout

Add the roles to your control repo (roles/ symlinked or vendored). A minimal play:
site.yml

certplane_broker role

Required variables

group_vars/certplane_broker.yml

Useful variables (with defaults)

When certplane_broker_secrets_provider is vault or openbao, also set certplane_broker_vault_address and one of certplane_broker_vault_token / certplane_broker_vault_token_file.

What the role does

  1. Creates the certplane system user/group.
  2. Copies the broker binary to certplane_broker_binary_dest.
  3. Creates /etc/certplane, /etc/certplane/tls, /etc/certplane/ca, /var/lib/certplane, and /var/lib/certplane/acme.
  4. Deploys TLS cert/key, agent CA bundle, ACME account key (if provided), and the policy file.
  5. Renders broker.yml from templates/broker.yml.j2.
  6. Installs and enables certplane-broker.service. Any change to TLS material, the policy file, or the rendered config triggers a service restart.

certplane_agent role

Required variables

host_vars/edge01.yml

Useful variables (with defaults)

What the role does

  1. Creates the certplane system user/group.
  2. Installs the agent binary at certplane_agent_binary_dest.
  3. Deploys the issuer CA bundle, broker CA bundle, and (optionally) the step-ca root bundle.
  4. Renders agent.yml from templates/agent.yml.j2.
  5. Enrolls the host once. If identity.crt does not exist and certplane_agent_bootstrap_token is defined, the role writes the token (no_log: true) and runs certplane-agent ... enroll as the certplane user. On success the token file is removed by the binary.
  6. Installs certplane-agent.service (oneshot, check then run) and certplane-agent.timer (boots after 1min, fires every 6h with 5min jitter).
  7. Enables and starts the timer.
The enrollment step is idempotent: once identity.crt exists, future runs of the role skip both the token deployment and the enroll command.
  • Pass certplane_agent_bootstrap_token from your inventory via Ansible Vault or a runtime lookup (step ca token).
  • Never check raw step-ca tokens into git — they are short-lived but still single-use.
  • For DNS provider tokens consumed by the broker, prefer secrets.provider: vault. See Vault and OpenBao secrets.