Skip to main content
On this page

Jobs and runs

A job is a saved launch configuration. A run is one execution of that job against one host. A launch creates a run group with one run per resolved target.

Job fields

A job defines:

  • the project and one or more entrypoint files;
  • the current or a pinned revision;
  • the working directory inside the project;
  • the inventory source: a managed Piping target set or the project's native inventory;
  • the execution environment;
  • typed parameters, ansible-playbook options, environment variables and secret references;
  • a timeout and an optional target limit.

Regular fields are structured: the entrypoint is picked from project files, options are switches and fields instead of raw arguments, and secrets are selected by name. Raw JSON remains in the advanced section for unusual cases and is validated before saving.

Modes of launch

ModeHow it startsValues supplied
ManualThe job list, or the host inspector when the job is assigned thereEvery parameter, prefilled with defaults and saved job values
QuickThe one-click action on a host with a matching assignmentOnly required parameters that are still missing
ScheduledA schedule fires on its cron expressionDefaults, then saved job values, then schedule overrides

Manual and scheduled launches use the saved job configuration. A schedule adds its own target snapshot or selector on top; it does not rewrite the job.

See Playbook parameters for the value order and the typed controls.

Launch checks

The launch dialog shows the job, project, revision and target composition:

  • the saved target set, its mode and host count;
  • the first hosts and a link to the full preview;
  • warnings for an empty composition, an over-limit set, hosts without a bound address, missing permissions or missing secrets.

While the composition is unresolved or invalid, the run is not queued. The composition is fixed before dispatch, so editing the target set later does not change an existing run group.

Results

A run card shows the group and per-host status, live output, events, artifacts and the exit code. You can cancel one run or stop the whole group.

StatusMeaning
queuedWaiting for dispatch
leasedClaimed by the supervisor, not started in the container yet
dispatchingThe execution request is being delivered
runningansible-playbook is executing
succeededFinished with a valid successful host result
failedFinished with a reported failure
canceledCanceled by a user
timed_outExceeded the job timeout
unreportedFinished without a valid terminal structured result: neither confirmed

unreported is not a success. It means the end state could not be established, for example because the container died or the callback never arrived.

Execution environments

An execution environment defines the OCI image that runs ansible-playbook, the runner group, environment variables and the image pull policy. The image is pinned by digest in a run, so changing a tag does not change a prepared launch. Sync and launch refuse an environment whose image is disabled or not pinned.

Limits

  • The launch dialog limits one run to 500 hosts; the API accepts a prepared target_limit up to 50,000.
  • A project's native inventory does not support selecting individual hosts in the dialog.
  • Interactive input during a run is not supported: variables, passwords and SSH access are supplied in advance.
  • A host without an address bound to an interface does not participate in a run.

Linux and Windows

The transport is not guessed from the host name. It is the protocol of the connection-config record assigned to the target; exactly one of SSH, WinRM or PSRP must participate, and an ambiguous or empty set is refused.

TargetTransportAuthenticationTLS and trustJump chain
LinuxSSHPrivate key onlyStrict host-key pins from the trust storeOrdered chain, at most 8 hops
WindowsOpenSSHPrivate key onlyStrict host-key pinsSupported like Linux
WindowsWinRMUsername and password, basic or ntlmHTTPS on 5986 with certificate validation always onNot supported; the record is refused
WindowsPSRPUsername and password, basic or ntlmAs WinRMNot supported; the record is refused

Windows OpenSSH states its shell explicitly on the record with options.shell = "powershell"; sh is the default and nothing is inferred. On Linux, become is an explicit job switch: enabling it does not grant a credential and a missing privilege password fails unattended rather than prompting.

There is no "ignore certificate" option. An untrusted WinRM or PSRP endpoint fails with an explicit error instead of downgrading the connection.

Transport availability is not fact support

A reachable transport does not by itself prove that Ansible can collect the facts a playbook uses. Windows fact modules need the Windows module set and a supported PowerShell version, while Linux fact modules need a POSIX target. A Windows host reached over OpenSSH remains a Windows host: its shell and fact keys are Windows-specific, not Linux.

The runner pins the ansible.windows collection. Its setup module requires PowerShell 5.1 or newer; on an older Windows host it stops with Ansible requires PowerShell v5.1. Such a run fails explicitly. Do not treat the missing facts as empty values, zero capacity or proof that the host lacks the data.

WinRM and PSRP are also available over TLS on port 5986 with certificate validation. If the target does not serve 5986 with a trusted certificate, the connection fails; the documented alternative is an explicit cleartext scheme: http record on port 5985, not a disabled certificate check.

Built-in jobs

The Piping catalog ships two system jobs: Auto-update inventory collects host facts and writes them to inventory, and Exporter discovery looks for exporters on the hosts of a run. Both are opened in Playbooks → Jobs; their parameters are the job editor fields built from the catalog schema. Their definition — entrypoint, parameter schema and launch arguments — belongs to the catalog and is read-only in the interface. Instance settings (execution environment, enabled state, current or fixed revision, parameter overrides, targets, run timeout) are edited like any other job; a catalog reseed updates the definition and preserves those values.

The job row is created at startup when an enabled default execution environment is configured. Otherwise GET /api/v1/playbooks/catalog/{slug} reports the reason: catalog_not_loaded, execution_environment_not_configured, template_not_seeded, execution_environment_unavailable, targets_not_configured or revision_unavailable. That answer means the job is not launchable in this state, not that it will run by itself later.

Revision current follows the catalog; fixed keeps the selected snapshot of the same system project. A snapshot without the required entrypoint or with an incompatible parameter schema reports revision_unavailable; there is no fallback to another revision.

Auto-update inventory

The job and its schedule start disabled. Enabling the job and the schedule is an explicit administrator action that requires permission to update settings; without it they cannot be enabled. A Piping start, catalog refresh and version upgrade never enable the job and never overwrite its owner, target set, schedule, parameter overrides, selected revision or enabled state. Without an active instance administrator, creation of the job and schedule is deferred and existing objects are not reassigned.

The default schedule fires once a day at 00:00 UTC (fire_once, skip_if_running). Its target set is dynamic: it selects hosts by bound addresses and the SSH, WinRM and PSRP protocols, and membership is resolved again at each firing. The default run timeout is 90 s and is an instance setting.

Collection and writing are switched separately per group. Every parameter below is enabled by default.

GroupCollectionWrite
OS platformpiping_inventory_collect_platformpiping_inventory_write_platform
Hardware modelpiping_inventory_collect_device_typepiping_inventory_write_device_type
Serial or UUIDpiping_inventory_collect_serialpiping_inventory_write_serial
CPU and memorypiping_inventory_collect_resourcespiping_inventory_write_resources
Interfacespiping_inventory_collect_interfacespiping_inventory_write_interfaces
IP addressespiping_inventory_collect_ip_addressespiping_inventory_write_ip_addresses
MAC addressespiping_inventory_collect_mac_addressespiping_inventory_write_mac_addresses
VM diskspiping_inventory_collect_virtual_diskspiping_inventory_write_virtual_disks
Ansible metadatapiping_inventory_collect_ansible_custom_fieldspiping_inventory_write_ansible_custom_fields

A disabled collection group sends no observations and reports skipped with reason disabled; that group's write is skipped even if its write switch is still on. A write switch alone does not start collection. Disabling piping_inventory_write_interfaces also skips IP and MAC writes.

Other job parameters:

  • piping_inventory_become (default false) requests privilege escalation for Linux fact providers only; POSIX become is never applied to Windows.
  • piping_inventory_preview collects facts and reports the payload without sending it.
  • piping_inventory_gather_timeout is the per-host gather timeout, 8 s (3–60).
  • piping_inventory_rest_timeout is 10 s (2–60), piping_inventory_rest_retries is 1 (1–5) and piping_inventory_rest_delay is 1 s (0–30) for the request to Piping.

Only fields the model has for the object type are written. On a virtual machine CPU, memory and total disk land in vcpus, memory (MB) and disk (GB), and disks in virtualization_virtualdisk. A device has no such columns, so CPU, memory, total disk and physical disks are not written, and no separate entities are created for them. Hardware model applies to devices only, and the VM type is never inferred. Business attributes — site, tenant, role, cluster, status, name — are not filled from facts. Ansible metadata is written to local_context_data.ansible.

On Linux only piping_inventory_become requests privilege escalation; POSIX become is never applied to Windows, and Windows fact modules need PowerShell 5.1 or newer. An unavailable provider does not abort the other groups: observed values stay usable and the affected groups report partial or error with reason provider_unavailable.

Manual values are protected per field. Before a write, the path compares the stored value with the value the collector last wrote and checks the retained source's binding to this host. A non-empty field without confirmed source ownership is preserved with reason manual_override, even when the observation equals it: equality does not create ownership. If a person edited the field after the last collection, the group is skipped with manual_override; an older observation reports stale. A field an operator cleared stays protected, and a group switch turned off leaves that group untouched. An observation from a different authorized source class is applied but reported as source_conflict; a repeated run of the same class is a repeated observation, not a new source.

The response reports independent collection and write stages per group with status complete, partial, skipped, error or unreported. Valid observations are written even when collection is partial. A failed group rolls back to its savepoint and reports error, while the other groups commit, so a partial result is visible instead of being presented as complete success.

A skipped collection proves no absence. A disabled or failed group sends no request, deletes nothing and marks nothing absent; an absent field does not clear the stored value. Unknown capacity is not written as zero, and an absent virtual-disk size is recorded in provenance as absent, not as an observed zero. The write, ownership and partial-status contract is described in Returning results.

Exporter discovery

The job collects exporter evidence and applies the absence policy to it. Search has two independent sources, both enabled by default:

  • piping_discovery_host_inspection inspects the host: services, processes, containers and listening sockets.
  • piping_discovery_endpoint_probe probes approved endpoints with an HTTP request from Piping.

Disabling inspection marks only that source as skipped; enabled probes still run. Inspection supports Linux and Windows; an unsupported platform yields skipped.

A probe does not scan ports or reach arbitrary addresses. It uses endpoints from configured assignments and piping_discovery_extra_endpoints, and an extra endpoint must address a host in the run's composition. An observed listening socket does not authorize a probe by itself, and an unapproved endpoint is reported as skipped and not contacted. piping_discovery_excluded_hosts and piping_discovery_excluded_ports skip hosts and ports; an excluded host yields skipped, never absence.

The exporter type comes from a catalog assignment or a typed machine identifier: unit, service, executable, container image. A probe response never assigns a type: without a declared type the observation stays unverified.

StatusMeaning
confirmed_discoveredPresence proven: a listener with a typed owner, or a metrics response on the declared endpoint
unverifiedSomething was observed, but presence or type is not proven: an unrecognized listener owner or a response that is not a metrics response
unreachableThe probe could not connect: refused, timeout, TLS failure or a rejected redirect
confirmed_absentPositive absence: a complete listening-socket inspection found no listener for the declared endpoint, and the address is observable from that host
skippedThe source is disabled, the platform is unsupported, the target is out of scope or permission is insufficient
errorThe observation itself failed: command error, parse error, truncated or partial result

Only a complete host inspection produces confirmed_absent; a partial or truncated inspection, an error, a skip or an exclusion never proves absence. unreachable is not absence: one failed HTTP probe proves nothing. Neither inspection nor probing proves that a Prometheus scraper can reach the endpoint.

The absence policy is set through job parameters:

  • piping_discovery_absence_policy: manual (default) or automatic.
  • piping_discovery_absence_confirm_runs: how many consecutive complete runs with confirmed absence are required, 3 by default (1–50).
  • piping_discovery_restore_on_reappearance: whether to restore the item when the endpoint is confirmed again, true by default.

In manual mode a confirmed absence stays in the report and service discovery does not change: a person removes exporter assignments. automatic is enabled only explicitly and acts on the item of the profile created by the source (discovery-<source_kind>-<source_id>): after the required number of confirmed absences the item is disabled. Manual profiles, manual assignments and manual label edits are never touched, and an endpoint already covered by a manual assignment is left alone. With piping_discovery_restore_on_reappearance, a disabled item and the source assignment are enabled again when the same endpoint is confirmed discovered. A type that is absent from the exporter catalog creates no item.

Other job bounds: piping_discovery_probe_timeout_ms is 3000 ms (100–30000), piping_discovery_probe_concurrency is 4 (1–16), piping_discovery_max_endpoints_per_host is 64 (1–512), piping_discovery_command_timeout is 10 s (2–60), piping_discovery_rest_timeout is 15 s (2–120) and piping_discovery_rest_retries is 1 (1–5). piping_discovery_detect_exporter_type (default true) allows type resolution from a typed machine identifier; when disabled, the type comes only from the assignment. piping_discovery_labels adds labels to the observations of this run without changing the labels of configured assignments. A truncated endpoint set is reported as partial and cannot prove absence. The report is stored as the exporter-discovery-report run artifact with per-host status counts and a partial flag; it does not reorder service discovery targets or mark hosts stale.

Assignments and service discovery output are described in Observability and monitoring.