Files
Kamino/roles/openbao/defaults/main.yml
T
Defame1297 eda69bcbf5 feat(openbao): add the role's main entry point
A consumer gets a running single-node OpenBao server on integrated raft
storage, listening on TLS they supply, left uninitialised and sealed.

The role installs the pinned 2.7.3 release tarball, checked by get_url
against the sha256 of each architecture from the release's checksums.txt
(its GPG signature checks out against OpenBao's release key). It creates
its own system user, data directory, configuration and sandboxed unit:
Type=notify, SIGINT stop, MemorySwapMax=0 instead of mlock, an empty
capability set, ProtectSystem=strict with the data directory writable,
and ExecReload sending SIGHUP. The directive set was tried against the
real binary under systemd before it was kept.

TLS certificate, key and CA paths are required unless openbao_tls_disable
is true, which warns; validation fails before any change when a file is
missing, and the role checks the service user can read the key and
certificate before writing the config. It reads its seal status over
https://127.0.0.1 validated against the CA file, so an address other
than a wildcard or loopback gets a second loopback listener.

The tasks are split by job (validate, prereqs, install, configure,
seal_status) so the init, unseal, audit and update work can reuse them.

Refs: #536
Assisted-by: Claude Code
2026-12-06 21:19:15 +00:00

35 lines
1.5 KiB
YAML

---
# The sha256 values are those of the release's checksums.txt, whose GPG signature checks out
# against OpenBao's release key. Pin the version and both hashes together in inventory to move
# ahead of the role's pin.
openbao_version: "2.7.3"
openbao_sha256:
amd64: "131df9a21cf3dd2dff47107110b369c9974cbdaa482bcbc723b81b3403c68ecd"
arm64: "b505b07af4206fdf0e81b747fcb7e9e63f2c2b05e26ead973cce62d0ed07d0e0"
# The release directory; the role appends openbao_<version>_linux_<arch>.tar.gz.
openbao_release_url: "https://github.com/openbao/openbao/releases/download/v{{ openbao_version }}"
openbao_user: "openbao"
openbao_group: "openbao"
openbao_bin_path: "/usr/local/bin/bao"
openbao_config_dir: "/etc/openbao"
openbao_data_dir: "/var/lib/openbao"
openbao_listen_address: "0.0.0.0"
openbao_port: 8200
openbao_cluster_port: 8201
openbao_api_addr: "{{ 'http' if openbao_tls_disable | bool else 'https' }}://{{ inventory_hostname }}:{{ openbao_port }}"
openbao_cluster_addr: "https://{{ inventory_hostname }}:{{ openbao_cluster_port }}"
openbao_node_id: "{{ inventory_hostname }}"
# Paths on the host. The role never creates or copies key material: it asserts that these files
# exist and that the service user can read them. Required unless openbao_tls_disable is true.
openbao_tls_cert_file: ""
openbao_tls_key_file: ""
openbao_tls_ca_file: ""
openbao_tls_min_version: "tls12"
# Plain HTTP on the listener; the role accepts it with a warning.
openbao_tls_disable: false
openbao_ui: false