Skip to main content
On this page

Runtime context

A run receives a fixed set of inputs from the platform. Everything else comes from the job: project files, declared variables and secret references.

Inventory

Run kindInventory Ansible readsBuilt by
ManagedGenerated inventory content built from the resolved target setThe platform
NativeThe project's own inventory sourcesThe project

A native run keeps the project inventory sources, and the runner never replaces native project configuration.

Per-host variables

A managed run injects these host variables:

VariableValue
piping_run_idIdentifier of the run
piping_source_kinddevice or virtual_machine
piping_source_idIdentifier of the source object
piping_target_kindKind of the target
piping_target_idIdentifier of the target
piping_target_nameName of the target

A variable is absent when the run has no such value. Nothing else is injected as a host variable.

Reserved environment

PIPING_API_URL and PIPING_RUN_TOKENS_FILE belong to the sandbox. The run-token file is a private controller file with mode 0600.

A job cannot set or override these names through declared environment or secret references. The launch rejects a job that declares either one.

Secret environment variables

Secret environment variables come only from options.secret_refs: the key is the environment name, the value is a secret UUID.

ConditionResult
The launching user has credential delegation on the secretThe value is delivered
The secret is protectedThe launch is refused

Read the value in a task with the environment lookup:

vars:
  registry_token: "{{ lookup('piping.space.runtime_secret', 'REGISTRY_TOKEN') }}"

The lookup refuses names starting with PIPING_, ANSIBLE_ or SSH_, and refuses HOME and PATH.

Parameters are not environment

Parameter values are extra-vars. A secret-reference parameter is never interpolated into variables; use the environment lookup instead.

Entrypoint and prompts

Entrypoint paths are project-relative and validated. The working directory is the job's workdir.

An interactive prompt cannot be answered: stdin is closed, and needs-input options are rejected before Ansible starts.

Become and launch scope

Become is explicit. A declared limit and the inventory selection belong to the platform, not to raw arguments.

System playbooks

Copying a built-in system playbook into a project produces an ordinary project playbook. The copy does not gain the run-token capability of the playbook it was copied from.