Make Scriptorium configuration ownership configurable

This commit is contained in:
2026-09-14 14:00:03 +00:00
parent 8f47aa802a
commit 8b4c86e48e
4 changed files with 40 additions and 8 deletions

View File

@@ -16,6 +16,10 @@ scriptorium_manage_build_dependencies: true
scriptorium_go_snap_channel: 1.26/stable
scriptorium_go_binary: /snap/bin/go
scriptorium_config_path: /usr/local/etc/scriptorium/config.yml
scriptorium_config_owner: root
scriptorium_config_group: root
scriptorium_config_directory_mode: "0755"
scriptorium_config_file_mode: "0644"
scriptorium_prompt_dir: null
scriptorium_profile_dir: null
scriptorium_schema_dir: null
@@ -40,10 +44,14 @@ binary is `root:root` mode `0755`.
Every application configuration variable defaults to `null`, so it and any
empty parent section are omitted and Scriptorium retains ownership of its
built-in defaults. When no values are selected, the role writes `{}` to
`scriptorium_config_path` as `root:root` mode `0644`. Non-null falsey values
are retained. `scriptorium_backends` is the native mapping supplied by the
caller; the role does not merge or rewrite it. For example, inventory can
compose fragments in the ordinary way:
`scriptorium_config_path`. It manages that file and its parent directory with
`scriptorium_config_owner`, `scriptorium_config_group`,
`scriptorium_config_directory_mode`, and `scriptorium_config_file_mode`. The
standalone defaults are `root:root`, directory mode `0755`, and file mode
`0644`; composing roles may override this generic configuration interface.
Non-null falsey values are retained. `scriptorium_backends` is the native
mapping supplied by the caller; the role does not merge or rewrite it. For
example, inventory can compose fragments in the ordinary way:
```yaml
scriptorium_backends: "{{ scriptorium_local_backends | combine(scriptorium_remote_backends) }}"