From 1566ed593907c829827237aad924c3f527723218 Mon Sep 17 00:00:00 2001 From: Luke Hoersten Date: Sun, 26 Jul 2026 11:49:11 -0500 Subject: mattertimesync: add build + server roles Build role compiles the tagged source on the build host (npm ci + npm run bundle) into a versioned mattertimesync-.tar.gz in build_srv_dir. Server role installs the single bundled .mjs, creates the mattertimesync service user and a 0700 storage dir for the Matter fabric keys, templates config.json, and runs a hardened oneshot sync via a systemd timer. Both roles depend on the nodejs role for Node >=20. --- mattertimesync/server/defaults/main.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 mattertimesync/server/defaults/main.yaml (limited to 'mattertimesync/server/defaults/main.yaml') diff --git a/mattertimesync/server/defaults/main.yaml b/mattertimesync/server/defaults/main.yaml new file mode 100644 index 0000000..4c952b0 --- /dev/null +++ b/mattertimesync/server/defaults/main.yaml @@ -0,0 +1,24 @@ +--- + +# https://github.com/lukehoersten/mattertimesync/tags +mattertimesync_version: "0.1.0" + +mattertimesync_user: "mattertimesync" +mattertimesync_install_dir: "/opt/mattertimesync" +mattertimesync_config_dir: "/etc/mattertimesync" +# Persistent Matter fabric state — holds the controller's private keys and +# operational certs, so it stays mode 0700 and owned by the service user. +mattertimesync_storage_path: "/var/lib/mattertimesync" + +# --- config.json --- +# IANA time-zone name (never a fixed UTC offset; DST is derived from it). +mattertimesync_timezone: "America/Chicago" +mattertimesync_log_level: "info" # debug, info, warn, error + +# --- systemd timer schedule --- +mattertimesync_on_boot_sec: "2min" +mattertimesync_on_active_sec: "1h" +mattertimesync_randomized_delay_sec: "5min" + +# mattertimesync_bin_url: — required, set in host_vars, e.g. +# http://{{build_server_host}}:{{build_server_port}}/mattertimesync-{{mattertimesync_version}}.tar.gz -- cgit v1.2.3