Execution controls
Configuring execution controls¶
These variables select how the settings workflow runs: entry point behavior, backend,
scope, failure mode, and output locations. All defaults are static values in
defaults/main.yml.
Entry points
Entry points are selected with tasks_from — apply, discover, or
restore (main runs the default apply workflow). Each entry point
validates its inputs through its own argument spec.
Example invocation¶
- name: Apply everything declared, strictly, through the API
ansible.builtin.include_role:
name: primetheus.gitlab_settings
tasks_from: apply
vars:
gitlab_settings_backend: api
gitlab_settings_mode: strict
gitlab_settings_output_file: /var/log/gitlab-settings/last-apply.json
Execution Controls Spec¶
|
Ordered mutation transport preference. Values: Default: | Example: |
|
Scope of reconciliation. The default reconciles all declared desired state; empty scopes cost nothing. Set a narrower scope only for deliberately phased orchestration (for example: apply instance settings, create groups externally, then apply group settings). Can be one of: Default:
| Example: |
|
Failure behavior for operations that cannot be applied (unknown fields, missing groups/projects, capabilities absent on the target). Can be one of: Default: | Example: |
|
Allow a strict-mode recorded skip only when a selected transport channel is unavailable. It does not permit a backend preference that omits every capable transport. Default: | Example: |
|
Where the Default: | Example: |
|
Snapshot consumed by Default: | Example: |
|
Controller-side path where Default: | Example: |
|
Inventory hostname of the GitLab Omnibus host for the Default: | Example: |
|
Escalate privileges on the Omnibus host to run Default: | Example: |
|
Timeout in seconds for the single Default: | Example: |
|
Positive timeout in seconds for each REST or GraphQL request (maximum Default: | Example: |
|
Non-negative transient request retries shared by REST and GraphQL, up to Default: | Example: |
|
Non-negative base seconds between transient REST or GraphQL retry attempts, up to Default: | Example: |
Result document¶
apply registers gitlab_settings_apply_result (and writes it to
gitlab_settings_output_file when set):
{
"backends": ["rest", "graphql"],
"resource": "all",
"changed": [
{"id": "op0001", "resource": "application_settings", "target": "application"},
{"id": "op0002", "resource": "system_hook", "target": "system_hooks.name.audit"},
{"id": "op0003", "resource": "group_push_rule", "target": "platform.push_rules"}
],
"skipped": [
{
"id": "op0004",
"resource": "group_saml_provider",
"target": "platform.saml_provider",
"reason": "requires the rails transport"
}
],
"coverage": [
{"id": "op0001", "resource": "application_settings", "target": "application", "backend": "rest"},
{"id": "op0002", "resource": "system_hook", "target": "system_hooks.name.audit", "backend": "rest"},
{"id": "op0003", "resource": "group_push_rule", "target": "platform.push_rules", "backend": "rest"},
{
"id": "op0004",
"resource": "group_saml_provider",
"target": "platform.saml_provider",
"skipped": true,
"reason": "requires the rails transport"
}
]
}
Each result record is bound to a planned operation by id, resource, and
target. skipped entries appear only in compatible mode (in strict mode
the first unappliable operation fails the run). coverage has one entry per
planned operation and records either the backend that processed it or the
reason it was skipped.
Discovery fact¶
discover overwrites gitlab_settings_capabilities for each invoking host in
the current play:
gitlab_settings_capabilities:
version: 19.2.0-ee
revision: null
enterprise: true
maximum_group_depth: 20
The fact is not marked cacheable. It reports target capability metadata only;
captured application settings are written separately when
gitlab_settings_snapshot_file is set.