ansible-refactoring #45
Loading…
Reference in a new issue
No description provided.
Delete branch "ansible-refactoring"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase 3 consistency work from the refactoring audit: - Variable prefixes: rename role variables to <role_name>_* so every role follows one convention: * uptime-kuma: kuma_* -> uptime_kuma_* * pelican-wings: wings_* -> pelican_wings_* (iscsi_* stays as-is; it is the util/iscsi-client interface, like swapfile_* or firewall_*) * pelican-panel: pelican_* -> pelican_panel_*, php_version -> pelican_panel_php_version * zigbee2mqtt: mqtt_server -> zigbee2mqtt_mqtt_server, zigbee_adapter_usb_path -> zigbee2mqtt_adapter_usb_path Renames cover roles, group_vars, Jinja templates, the healthchecks filter plugin, kuma-validate.yml, service SKILL.md files, and tests. - mosquitto: add defaults/main.yml (previously the only service role without one) and extract the hardcoded vault/config/passwd paths into mosquitto_* variables. - Handler naming: convert all remaining lowercase handler names to the Title Case convention used by the majority of roles (e.g. "restart zigbee2mqtt" -> "Restart Zigbee2MQTT"). All 27 notify targets audited to resolve against a defined handler or listen. - Quote style: all file modes now use double quotes. - Booleans: unquoted yes/no values converted to true/false. - Flush handlers: add meta: flush_handlers to forgejo-runner (before service verification), llamacpp, mosquitto, openclaw, paperclip, and zigbee2mqtt so service restarts apply before follow-up roles run (e.g. zigbee2mqtt now sees a restarted mosquitto in the same play). - pelican-panel: move role-local Jinja templates (env.j2, pelican.conf.j2) to services/pelican/panel/ where every other role stores its templates. - Also convert remaining ansible.builtin.systemd references to the canonical ansible.builtin.systemd_service name.Drop the locally built paperless-ngx image (localhost/paperless-ngx: 3.2.1-deepseek-openrouter-embedding) and move to the pinned stock ghcr.io/paperless-ngx/paperless-ngx:3.3.1 with pull policy "missing". Both patches the image carried are natively supported by 3.3.x: - Separate embedding API key: PAPERLESS_AI_LLM_EMBEDDING_API_KEY has been an upstream setting since 3.3.0 (falls back to the main LLM key only when unset), replacing the embedding.py patch that read the variable via os.environ. - DeepSeek thinking disable: 3.3.0 added PAPERLESS_AI_LLM_EXTRA_PARAMS, a JSON object merged into every LLM request via additional_kwargs - the exact injection point of the former client.py patch. The new paperless_ai_llm_extra_params default renders {"extra_body": {"thinking": {"type": "disabled"}}}, so DeepSeek V4.1-Flash still receives thinking=disabled for suggestions and chat. Upstream itself still sends tool_choice=required and treats the provider rejection as an error, so the extra parameter remains required; it is now plain configuration instead of an image patch. Role changes: remove the build context, Dockerfile install, image existence check, and build tasks; prune task now keeps only the single pinned stock image (and will drop the old localhost/* custom images on deploy, freeing another ~2.6GB on the 16GB rootfs). services/ paperless/Dockerfile deleted; SKILL.md rewritten for the stock image and native settings. Verified with --check against paperless (ok=89, changed=4, failed=0). Deployment (image pull, webserver restart, 3.3.x DB migrations) is a reviewed apply: run `task ansible:site-limit:paperless`.The env template used Ansible's quote filter on the EXTRA_PARAMS JSON, which wrapped the value in literal quotes. Paperless' JSON parser then rejects it ("Expecting value (line 1, column 1)") and the webserver container crashes during settings import on boot - before migrations, so no data is affected. Env files are consumed whole-line; the raw JSON object needs no quoting.