@ansible-flow/assets 0.0.0-stage → 0.86.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1029 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://example.invalid/flow.schema.json",
4
+ "title": "Ansible flow designer document",
5
+ "type": "object",
6
+ "required": [
7
+ "schema_version",
8
+ "flow",
9
+ "nodes",
10
+ "edges"
11
+ ],
12
+ "properties": {
13
+ "schema_version": {
14
+ "enum": [1, 2],
15
+ "description": "Format version of this file: 2 for new flows; a 1 stays readable, and Upgrade Flow Format (or the upgrade_format op) moves it to 2 in one undo step."
16
+ },
17
+ "flow": {
18
+ "type": "object",
19
+ "required": [
20
+ "key",
21
+ "name",
22
+ "version"
23
+ ],
24
+ "properties": {
25
+ "id": {
26
+ "$ref": "#/$defs/ulid",
27
+ "description": "Fixed ID of the flow (ULID). Leave it out when writing by hand: Complete IDs adds it. Never change it."
28
+ },
29
+ "key": {
30
+ "$ref": "#/$defs/slug",
31
+ "description": "Short name of the flow: lowercase letters, digits and dashes. Names the generated playbook."
32
+ },
33
+ "name": {
34
+ "type": "string",
35
+ "description": "Human name of the flow."
36
+ },
37
+ "version": {
38
+ "type": "integer",
39
+ "minimum": 1,
40
+ "description": "Bumped once per commit when the design changes (not for layout moves). Tools bump it; do not edit by hand."
41
+ },
42
+ "goal": {
43
+ "type": "string",
44
+ "description": "What the flow achieves, in a sentence."
45
+ },
46
+ "owner": {
47
+ "type": "string",
48
+ "description": "Team or person that owns the flow."
49
+ },
50
+ "runtime": {
51
+ "type": "object",
52
+ "properties": {
53
+ "kind": {
54
+ "enum": [
55
+ "awx_workflow",
56
+ "awx_job",
57
+ "ansible_playbook"
58
+ ],
59
+ "description": "Format 1: awx_job (one playbook), awx_workflow (approval segments) or ansible_playbook (local runs only). Format 2 derives it: AWX when a template is named, a workflow when approvals split the flow."
60
+ },
61
+ "template": {
62
+ "type": "string",
63
+ "description": "Name of the AWX job or workflow template."
64
+ },
65
+ "credentials": {
66
+ "type": "array",
67
+ "items": {
68
+ "type": "string"
69
+ },
70
+ "description": "Format 2: the AWX credentials of the template, by name (machine, vault …). Set Up AWX Template applies them, and records what was chosen."
71
+ },
72
+ "execution_environment": {
73
+ "type": "string",
74
+ "description": "Format 2: the AWX execution environment of the template, by name."
75
+ }
76
+ },
77
+ "description": "How the flow runs in AWX: a job template, or a workflow when approvals split it."
78
+ },
79
+ "imported_from": {
80
+ "type": "object",
81
+ "description": "Where an imported flow came from, for reference only: a one-time copy",
82
+ "required": [
83
+ "kind"
84
+ ],
85
+ "properties": {
86
+ "kind": {
87
+ "enum": [
88
+ "awx_workflow",
89
+ "awx_job_template",
90
+ "playbook"
91
+ ],
92
+ "description": "What the flow was imported from: an AWX workflow or job template, or a playbook."
93
+ },
94
+ "template": {
95
+ "type": "string",
96
+ "description": "Name of the imported AWX workflow or job template."
97
+ },
98
+ "id": {
99
+ "type": "integer",
100
+ "description": "ID of the imported template in AWX."
101
+ },
102
+ "path": {
103
+ "type": "string",
104
+ "description": "Repository path of the imported playbook (or the job template playbook)."
105
+ }
106
+ },
107
+ "additionalProperties": false
108
+ },
109
+ "maintenance_window": {
110
+ "type": "string",
111
+ "pattern": "^([0-9]+[smhd])+$",
112
+ "description": "Longest time the flow may take, e.g. 4h or 2h30m (Timing lens)"
113
+ },
114
+ "inputs": {
115
+ "$ref": "#/$defs/contract",
116
+ "description": "Inputs a run asks for. A host_list input with targets: true seeds the hosts entering the start node."
117
+ },
118
+ "external_vars": {
119
+ "type": "object",
120
+ "propertyNames": { "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" },
121
+ "additionalProperties": {
122
+ "type": "string",
123
+ "description": "Where the variable comes from (AWX extra vars, Kestra, inventory, a caller)."
124
+ },
125
+ "description": "Variables the flow reads that something outside it sets at run time (AWX or Kestra extra vars, inventory variables, the vars a caller passes): name -> where it comes from. Steps may read them without an input; they are not run inputs and get no survey question."
126
+ }
127
+ },
128
+ "additionalProperties": false,
129
+ "description": "The flow itself: identity, version, goal and the inputs a run asks for."
130
+ },
131
+ "nodes": {
132
+ "type": "array",
133
+ "items": {
134
+ "$ref": "#/$defs/node"
135
+ },
136
+ "description": "Nodes of the top level, in any order. Subflow nodes hold their own inner level under subflow."
137
+ },
138
+ "edges": {
139
+ "type": "array",
140
+ "items": {
141
+ "$ref": "#/$defs/edge"
142
+ },
143
+ "description": "Wires of the top level: an output port of one node to an input port of another node on the same level. One wire per output port."
144
+ },
145
+ "annotations": {
146
+ "type": "array",
147
+ "items": {
148
+ "$ref": "#/$defs/annotation"
149
+ },
150
+ "description": "Format 2: Notes, Sections and Text on the top level. They explain the flow and never run: editing them changes no version."
151
+ },
152
+ "layout": {
153
+ "$ref": "#/$defs/layout",
154
+ "description": "Canvas positions of every node at every level, by node ID (or by key while written by hand). Optional: missing positions are laid out automatically."
155
+ },
156
+ "decisions": {
157
+ "type": "array",
158
+ "items": {
159
+ "type": "object",
160
+ "required": [
161
+ "kind"
162
+ ],
163
+ "properties": {
164
+ "node": {
165
+ "$ref": "#/$defs/nodeRef",
166
+ "description": "The node the decision is about (open_on_purpose, drift_ignored; accepted except some lens findings)."
167
+ },
168
+ "port": {
169
+ "type": "string",
170
+ "description": "open_on_purpose: the fail port left open on purpose."
171
+ },
172
+ "kind": {
173
+ "enum": [
174
+ "open_on_purpose",
175
+ "drift_ignored",
176
+ "finding_accepted",
177
+ "accepted"
178
+ ],
179
+ "description": "Format 2: accepted, with finding saying what (port:<port>, drift:<item>, lens:<finding id>, check:<code>[:<subject>]). Format 1: open_on_purpose (a fail port stays unwired on purpose; hosts stop there), drift_ignored (design and code differ on purpose), finding_accepted (a lens finding is expected)."
180
+ },
181
+ "item": {
182
+ "type": "string",
183
+ "minLength": 1,
184
+ "description": "drift_ignored: the drift item kept as it is"
185
+ },
186
+ "finding": {
187
+ "type": "string",
188
+ "minLength": 1,
189
+ "description": "accepted: what is accepted (port:, drift:, lens: or check:); finding_accepted: the lens finding kept as expected"
190
+ },
191
+ "reason": {
192
+ "type": "string",
193
+ "description": "Why. Required in practice: the designer asks for it."
194
+ },
195
+ "by": {
196
+ "type": "string",
197
+ "description": "Who decided (Git user name). Tools fill it in."
198
+ },
199
+ "at": {
200
+ "type": "string",
201
+ "description": "When (a date), when the writer knows it."
202
+ }
203
+ },
204
+ "allOf": [
205
+ {
206
+ "if": {
207
+ "properties": {
208
+ "kind": {
209
+ "enum": [
210
+ "finding_accepted",
211
+ "accepted"
212
+ ]
213
+ }
214
+ }
215
+ },
216
+ "then": {
217
+ "required": [
218
+ "finding"
219
+ ]
220
+ },
221
+ "else": {
222
+ "required": [
223
+ "node"
224
+ ]
225
+ }
226
+ },
227
+ {
228
+ "if": {
229
+ "properties": {
230
+ "kind": {
231
+ "const": "drift_ignored"
232
+ }
233
+ }
234
+ },
235
+ "then": {
236
+ "required": [
237
+ "item"
238
+ ]
239
+ }
240
+ },
241
+ {
242
+ "if": {
243
+ "properties": {
244
+ "kind": {
245
+ "const": "open_on_purpose"
246
+ }
247
+ }
248
+ },
249
+ "then": {
250
+ "required": [
251
+ "port"
252
+ ]
253
+ }
254
+ },
255
+ {
256
+ "if": {
257
+ "properties": {
258
+ "kind": {
259
+ "const": "accepted"
260
+ }
261
+ }
262
+ },
263
+ "then": {
264
+ "properties": {
265
+ "finding": {
266
+ "pattern": "^(port|drift|lens|check):.+"
267
+ }
268
+ }
269
+ }
270
+ }
271
+ ],
272
+ "description": "One decision. kind decides which fields it needs."
273
+ },
274
+ "description": "Choices people made about the design: a fail port left open on purpose, a drift item or a lens finding kept as it is."
275
+ }
276
+ },
277
+ "$defs": {
278
+ "ulid": {
279
+ "type": "string",
280
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
281
+ "description": "A ULID: 26 characters, digits and uppercase letters (no I, L, O, U). Written by the designer and tools; never invent one by hand."
282
+ },
283
+ "slug": {
284
+ "type": "string",
285
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
286
+ "description": "Lowercase letters, digits and single dashes, e.g. backup-config."
287
+ },
288
+ "nodeRef": {
289
+ "anyOf": [
290
+ {
291
+ "$ref": "#/$defs/ulid"
292
+ },
293
+ {
294
+ "$ref": "#/$defs/slug"
295
+ }
296
+ ],
297
+ "description": "A node: its ID, or its key while the file is written by hand. 'Complete IDs' (designer quick fix, or the flow_complete_ids tool) replaces keys with IDs."
298
+ },
299
+ "contract": {
300
+ "type": "object",
301
+ "propertyNames": {
302
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
303
+ "not": { "enum": ["False", "None", "True", "and", "as", "assert", "async", "await", "break", "class", "continue", "def", "del", "elif", "else", "except", "false", "finally", "for", "from", "global", "if", "import", "in", "is", "lambda", "none", "nonlocal", "not", "or", "pass", "raise", "return", "true", "try", "while", "with", "yield"] },
304
+ "description": "Inputs and outputs become Ansible variables: a letter or _, then letters, digits and _; no Python keyword or Jinja constant."
305
+ },
306
+ "additionalProperties": {
307
+ "type": "object",
308
+ "properties": {
309
+ "type": {
310
+ "enum": [
311
+ "string",
312
+ "integer",
313
+ "boolean",
314
+ "list",
315
+ "dict",
316
+ "host_list",
317
+ "any"
318
+ ],
319
+ "description": "Value type. host_list is a list of inventory hosts or groups."
320
+ },
321
+ "required": {
322
+ "type": "boolean",
323
+ "description": "Inputs: a run must provide a value."
324
+ },
325
+ "default": {
326
+ "description": "Flow inputs: the value a run uses when none is given. Node inputs: what the step gets when its from left nothing (the generated play var falls back to it); with no from, the value itself."
327
+ },
328
+ "from": {
329
+ "type": "string",
330
+ "description": "Where the value comes from: <node_key>.<output> (an earlier node's output, on this level or around it), flow.<input> (a flow input), <subflow_key>.<input> inside that subflow (its input), or impl.register[.path] (outputs: the bound task's registered result). A subflow's outputs name an inner step's output (<step>.<output>); without from, the inner output of the same name. A node input is a play var: a fact or register of the same name set earlier on the host wins over it. The checks follow that: a step that sets the same name counts as setting the input, and input-shadowed warns when one runs after the from: step."
331
+ },
332
+ "optional": {
333
+ "type": "boolean",
334
+ "description": "Node inputs: the value may be undefined when the step runs, and the step checks it (x is defined, | default). The check that the producer ran on every path is skipped."
335
+ },
336
+ "targets": {
337
+ "type": "boolean",
338
+ "description": "Flow inputs only: this host_list input seeds the start node's host set."
339
+ },
340
+ "description": {
341
+ "type": "string",
342
+ "description": "Flow inputs: what the input is for, in words. The launch dialog, the run prompts and the AWX survey show it."
343
+ }
344
+ },
345
+ "required": [
346
+ "type"
347
+ ],
348
+ "description": "One input or output field."
349
+ },
350
+ "description": "Named inputs or outputs: name -> field."
351
+ },
352
+ "port": {
353
+ "anyOf": [
354
+ {
355
+ "enum": [
356
+ "in",
357
+ "ok_hosts",
358
+ "failed_hosts",
359
+ "unreachable",
360
+ "unchanged",
361
+ "always",
362
+ "cancelled",
363
+ "timeout",
364
+ "undo",
365
+ "true",
366
+ "false",
367
+ "approved",
368
+ "rejected",
369
+ "join"
370
+ ]
371
+ },
372
+ {
373
+ "type": "string",
374
+ "pattern": "^branch_[0-9]+$"
375
+ }
376
+ ],
377
+ "description": "A port name. Which ports a node has depends on its type: see the port catalog. Parallel branch ports are branch_1, branch_2, ..."
378
+ },
379
+ "portref": {
380
+ "type": "object",
381
+ "required": [
382
+ "node",
383
+ "port"
384
+ ],
385
+ "properties": {
386
+ "node": {
387
+ "$ref": "#/$defs/nodeRef",
388
+ "description": "The node: its ID, or its key while written by hand."
389
+ },
390
+ "port": {
391
+ "type": "string",
392
+ "pattern": "^[a-z][a-z0-9_]*$",
393
+ "description": "Port name: an output (from) or an input (to) of that node."
394
+ }
395
+ },
396
+ "additionalProperties": false,
397
+ "description": "One end of a wire: a node and one of its ports."
398
+ },
399
+ "edge": {
400
+ "type": "object",
401
+ "required": [
402
+ "from",
403
+ "to"
404
+ ],
405
+ "properties": {
406
+ "id": {
407
+ "$ref": "#/$defs/ulid",
408
+ "description": "Fixed ID of the wire (ULID). Leave it out when writing by hand: Complete IDs adds it."
409
+ },
410
+ "from": {
411
+ "$ref": "#/$defs/portref",
412
+ "description": "The output port the hosts leave from."
413
+ },
414
+ "to": {
415
+ "$ref": "#/$defs/portref",
416
+ "description": "The input port they enter (usually in)."
417
+ }
418
+ },
419
+ "additionalProperties": false,
420
+ "description": "A wire from an output port to an input port on the same level. Its hosts are the hosts that took that output."
421
+ },
422
+ "impl": {
423
+ "type": [
424
+ "object",
425
+ "null"
426
+ ],
427
+ "required": [
428
+ "kind",
429
+ "ref"
430
+ ],
431
+ "properties": {
432
+ "kind": {
433
+ "enum": [
434
+ "module",
435
+ "role",
436
+ "playbook"
437
+ ],
438
+ "description": "module, role or playbook."
439
+ },
440
+ "ref": {
441
+ "type": "string",
442
+ "description": "Fully qualified module or role name (e.g. ansible.builtin.ping, netops.baseline), or the playbook path in the repository."
443
+ },
444
+ "collection_version": {
445
+ "type": "string",
446
+ "description": "Collection version the binding was made against."
447
+ },
448
+ "params": {
449
+ "type": "object",
450
+ "description": "Module parameters or role variables. Jinja may reference inputs by name."
451
+ },
452
+ "register": {
453
+ "type": "string",
454
+ "description": "Variable that keeps the task result; outputs read it with from: impl.register."
455
+ },
456
+ "keywords": {
457
+ "type": "object",
458
+ "description": "Ansible task keywords written on the generated task as they are (module and role bindings). Jinja may reference inputs by name; when, changed_when and failed_when are Jinja tests without braces. What the flow models itself is set there instead: register (impl.register), tags, become, timeout, retries, delay and until (settings), handlers (steps with when: <register> is changed), block and rescue (subflows and failure paths).",
459
+ "properties": {
460
+ "when": {
461
+ "description": "Jinja test without braces (or a list, all must hold): hosts for which it is false skip the task and leave through ok_hosts."
462
+ },
463
+ "changed_when": {
464
+ "description": "Jinja test without braces that decides whether the result counts as changed; may read the registered result."
465
+ },
466
+ "failed_when": {
467
+ "description": "Jinja test without braces that decides whether the task failed; may read the registered result."
468
+ },
469
+ "loop": {
470
+ "description": "List to run the task over, usually Jinja (\"{{ interfaces }}\"); each item is item (or loop_control.loop_var)."
471
+ },
472
+ "loop_control": {
473
+ "type": "object",
474
+ "description": "Loop options: loop_var, index_var, label, pause, extended."
475
+ },
476
+ "ignore_errors": {
477
+ "description": "true: a failure is ignored and the host leaves through ok_hosts instead of failed_hosts."
478
+ },
479
+ "delegate_to": {
480
+ "description": "Run the task on this host instead (e.g. localhost), on behalf of each arriving host."
481
+ },
482
+ "delegate_facts": {
483
+ "description": "With delegate_to: facts go to the delegated host."
484
+ },
485
+ "run_once": {
486
+ "description": "Run the task once for the batch, on the first host; the result applies to every host."
487
+ },
488
+ "no_log": {
489
+ "description": "Hide the task result in the log (use for secrets)."
490
+ },
491
+ "check_mode": {
492
+ "description": "true: always run in check mode; false: run for real even in check mode."
493
+ },
494
+ "diff": {
495
+ "description": "Show or hide the diff of changes for this task."
496
+ },
497
+ "environment": {
498
+ "description": "Environment variables for the task (a map, or Jinja)."
499
+ },
500
+ "become_user": {
501
+ "description": "User to become (with settings.become)."
502
+ },
503
+ "become_method": {
504
+ "description": "Privilege escalation method (sudo, su, enable, ...)."
505
+ },
506
+ "become_flags": {
507
+ "description": "Extra flags for the become method."
508
+ },
509
+ "become_exe": {
510
+ "description": "Executable for the become method."
511
+ },
512
+ "connection": {
513
+ "description": "Connection plugin for this task (local, network_cli, ...)."
514
+ },
515
+ "remote_user": {
516
+ "description": "User to log in as."
517
+ },
518
+ "port": {
519
+ "description": "Port to connect to."
520
+ },
521
+ "throttle": {
522
+ "description": "Most hosts running this task at the same time."
523
+ },
524
+ "async": {
525
+ "description": "Run in the background for at most this many seconds."
526
+ },
527
+ "poll": {
528
+ "description": "Seconds between status checks of an async task (0: do not wait)."
529
+ },
530
+ "vars": {
531
+ "type": "object",
532
+ "description": "Task variables; for a role binding, put role variables in params instead."
533
+ },
534
+ "module_defaults": {
535
+ "description": "Default parameters for modules run by this task."
536
+ },
537
+ "debugger": {
538
+ "description": "When to start the task debugger (always, never, on_failed, ...)."
539
+ }
540
+ },
541
+ "patternProperties": {
542
+ "^with_[a-z_]+$": {
543
+ "description": "A with_<lookup> loop (with_items, with_dict, ...): prefer loop."
544
+ }
545
+ },
546
+ "additionalProperties": false
547
+ }
548
+ },
549
+ "description": "What the node runs: an Ansible module, a role or a playbook. null or absent: the node runs as a TODO stub (walking skeleton)."
550
+ },
551
+ "layout": {
552
+ "type": "object",
553
+ "additionalProperties": {
554
+ "type": "object",
555
+ "required": [
556
+ "x",
557
+ "y"
558
+ ],
559
+ "properties": {
560
+ "x": {
561
+ "type": "number",
562
+ "description": "Horizontal position."
563
+ },
564
+ "y": {
565
+ "type": "number",
566
+ "description": "Vertical position."
567
+ }
568
+ },
569
+ "description": "Top-left corner of the node on the canvas, in pixels."
570
+ },
571
+ "description": "Positions by node ID (or by key while written by hand)."
572
+ },
573
+ "annotation": {
574
+ "type": "object",
575
+ "required": [
576
+ "x",
577
+ "y",
578
+ "text"
579
+ ],
580
+ "additionalProperties": false,
581
+ "description": "A Note, Section or Text on a level (format 2): it explains the flow and never runs.",
582
+ "properties": {
583
+ "id": {
584
+ "$ref": "#/$defs/ulid",
585
+ "description": "Unique among the nodes, wires and annotations of the flow. 'Complete IDs' adds it when written by hand."
586
+ },
587
+ "key": {
588
+ "$ref": "#/$defs/slug",
589
+ "description": "Unique among the annotations of its level, e.g. note-1 or section-2; tools name it by this key."
590
+ },
591
+ "kind": {
592
+ "enum": [
593
+ "note",
594
+ "section",
595
+ "text"
596
+ ],
597
+ "description": "note (default): a sticky note; section: a titled region behind nodes, dragged with what is inside it; text: words with no background."
598
+ },
599
+ "x": {
600
+ "type": "number",
601
+ "description": "Left edge on the canvas, in pixels; for a note on a node, from the node's left edge."
602
+ },
603
+ "y": {
604
+ "type": "number",
605
+ "description": "Top edge on the canvas, in pixels; for a note on a node, from the node's top edge."
606
+ },
607
+ "width": {
608
+ "type": "number",
609
+ "minimum": 40,
610
+ "description": "Width in pixels. Absent: the kind's default (note 200, section 480, text fits its words)."
611
+ },
612
+ "height": {
613
+ "type": "number",
614
+ "minimum": 24,
615
+ "description": "Height in pixels. Absent: the kind's default (note 120, section 320, text fits its words)."
616
+ },
617
+ "color": {
618
+ "enum": [
619
+ "yellow",
620
+ "blue",
621
+ "green",
622
+ "pink",
623
+ "purple",
624
+ "gray"
625
+ ],
626
+ "description": "Background of a note, tint of a section, color of text. Absent: yellow (notes), gray (sections, text)."
627
+ },
628
+ "on": {
629
+ "$ref": "#/$defs/nodeRef",
630
+ "description": "Notes only: the node on the same level this note is about. The note moves with it, is deleted with it, and its text becomes a comment above the node's code."
631
+ },
632
+ "size": {
633
+ "enum": [
634
+ "s",
635
+ "m",
636
+ "l"
637
+ ],
638
+ "description": "Text only: small, medium (default) or large."
639
+ },
640
+ "text": {
641
+ "type": "string",
642
+ "description": "Markdown: **bold**, *italic*, `code`, - bullet lists and [links](https://...). A section's title; the words of a text."
643
+ }
644
+ }
645
+ },
646
+ "node": {
647
+ "type": "object",
648
+ "required": [
649
+ "key",
650
+ "type",
651
+ "title"
652
+ ],
653
+ "properties": {
654
+ "id": {
655
+ "$ref": "#/$defs/ulid",
656
+ "description": "Fixed ID of the node (ULID). Leave it out when writing by hand: Complete IDs adds it. Never change it."
657
+ },
658
+ "key": {
659
+ "$ref": "#/$defs/slug",
660
+ "description": "Short name, unique on its level: lowercase letters, digits and dashes. Wires and from: references may use it."
661
+ },
662
+ "type": {
663
+ "enum": [
664
+ "start",
665
+ "end",
666
+ "task",
667
+ "subflow",
668
+ "decision",
669
+ "approval",
670
+ "parallel",
671
+ "join"
672
+ ],
673
+ "description": "start (one, on the top level; hosts enter), end (hosts leave; outcome success or failed), task, subflow (has an inner level), decision (true/false per host), approval (a person approves), parallel (branches), join (branches meet)."
674
+ },
675
+ "title": {
676
+ "type": "string",
677
+ "description": "Human name shown on the canvas."
678
+ },
679
+ "intent": {
680
+ "type": "string",
681
+ "description": "What the node should do, in a sentence. Skeleton runs print it."
682
+ },
683
+ "status": {
684
+ "enum": [
685
+ "draft",
686
+ "specified",
687
+ "implemented",
688
+ "tested"
689
+ ],
690
+ "description": "How far the node is built: draft (an idea), specified (has inputs or outputs), implemented (bound to code; a control node once complete), tested (a passing run, or by hand with a reason). In format 2 it follows the node's content (a subflow: its lowest step) and the designer keeps it so; tested needs a `tested` record."
691
+ },
692
+ "tested": {
693
+ "type": "object",
694
+ "description": "Format 2: why the node counts as tested. A passing run (run, flow_version, commit) or a reason given by hand (reason, by, at).",
695
+ "properties": {
696
+ "run": {
697
+ "type": "string",
698
+ "description": "The run that passed."
699
+ },
700
+ "flow_version": {
701
+ "type": "integer",
702
+ "description": "The flow version that run executed."
703
+ },
704
+ "commit": {
705
+ "type": "string",
706
+ "description": "The commit the run executed (AWX runs)."
707
+ },
708
+ "reason": {
709
+ "type": "string",
710
+ "description": "Why it counts as tested, given by hand."
711
+ },
712
+ "by": {
713
+ "type": "string",
714
+ "description": "Who gave the reason (Git user name)."
715
+ },
716
+ "at": {
717
+ "type": "string",
718
+ "description": "When (a date)."
719
+ }
720
+ },
721
+ "anyOf": [
722
+ {
723
+ "required": [
724
+ "run"
725
+ ]
726
+ },
727
+ {
728
+ "required": [
729
+ "reason"
730
+ ]
731
+ }
732
+ ],
733
+ "additionalProperties": false
734
+ },
735
+ "inputs": {
736
+ "$ref": "#/$defs/contract",
737
+ "description": "Values the node needs, usually from: an earlier node or a flow input."
738
+ },
739
+ "outputs": {
740
+ "$ref": "#/$defs/contract",
741
+ "description": "Values the node produces for later nodes."
742
+ },
743
+ "ports": {
744
+ "type": "array",
745
+ "items": {
746
+ "$ref": "#/$defs/port"
747
+ },
748
+ "description": "Optional ports enabled beyond the type defaults (e.g. unreachable, timeout, always on a task)."
749
+ },
750
+ "impl": {
751
+ "$ref": "#/$defs/impl",
752
+ "description": "What the node runs: a module, a role or a playbook. Absent: a TODO stub."
753
+ },
754
+ "origin": {
755
+ "type": "object",
756
+ "required": ["task", "design"],
757
+ "additionalProperties": false,
758
+ "description": "Where an import took this step from (Re-import from Source matches by it).",
759
+ "properties": {
760
+ "task": {
761
+ "type": "string",
762
+ "description": "The source task: <file>#<task name>#<occurrence>."
763
+ },
764
+ "design": {
765
+ "type": "string",
766
+ "description": "Fingerprint of the step as imported: a different one means it was changed here."
767
+ },
768
+ "gone": {
769
+ "type": "boolean",
770
+ "description": "The task is no longer in the source (set by Re-import; the step stays)."
771
+ }
772
+ }
773
+ },
774
+ "ref": {
775
+ "type": "object",
776
+ "required": ["from", "version", "design"],
777
+ "additionalProperties": false,
778
+ "description": "Format 2: this subflow is a copy of a subflow in another flow (a shared subflow). Edit the source flow, then Update; Unlink makes the copy this flow's own.",
779
+ "properties": {
780
+ "from": {
781
+ "type": "string",
782
+ "pattern": "^.+#.+$",
783
+ "description": "<flow file, relative to this flow's folder>#<subflow key path in it>"
784
+ },
785
+ "version": {
786
+ "type": "integer",
787
+ "minimum": 1,
788
+ "description": "The source flow's version the copy was made from."
789
+ },
790
+ "design": {
791
+ "type": "string",
792
+ "description": "Fingerprint of the copy as it was made: a different one means it was changed here."
793
+ }
794
+ }
795
+ },
796
+ "undo": {
797
+ "$ref": "#/$defs/impl",
798
+ "description": "What reverses the node: the Rollback pattern binds this node's undo step to it."
799
+ },
800
+ "condition": {
801
+ "type": "string",
802
+ "description": "Decision nodes: Jinja test without braces, evaluated per host; it reads the node's inputs"
803
+ },
804
+ "outcome": {
805
+ "enum": [
806
+ "success",
807
+ "failed"
808
+ ],
809
+ "description": "End nodes"
810
+ },
811
+ "disabled": {
812
+ "type": "boolean",
813
+ "description": "true: the node is switched off. Hosts that reach it pass straight on to where its one wired main output leads, and its tasks are not generated. Not for start and end nodes."
814
+ },
815
+ "join_mode": {
816
+ "enum": [
817
+ "all",
818
+ "any"
819
+ ],
820
+ "description": "Join nodes: per host, all = every branch delivered the host (default), any = at least one"
821
+ },
822
+ "branches": {
823
+ "type": "integer",
824
+ "minimum": 2,
825
+ "description": "Parallel nodes: number of branch ports branch_1..branch_n (default 2)"
826
+ },
827
+ "handler": {
828
+ "enum": [
829
+ "rollback",
830
+ "notify",
831
+ "retry",
832
+ "exclude"
833
+ ],
834
+ "description": "Format 1 name of purpose. Marks a failure handler node (what kind of handling it does)"
835
+ },
836
+ "purpose": {
837
+ "enum": [
838
+ "rollback",
839
+ "notify",
840
+ "retry",
841
+ "exclude"
842
+ ],
843
+ "description": "Format 2: what the node is for in failure handling (rollback, notify, retry, exclude); the patterns set it, and a Rollback is found by it."
844
+ },
845
+ "approval": {
846
+ "type": "object",
847
+ "additionalProperties": false,
848
+ "description": "Approval nodes: who decides when a runner waits for a person (Ansible Flow Server). AWX workflows ignore it: their approvers are set in AWX.",
849
+ "properties": {
850
+ "approvers": {
851
+ "type": "array",
852
+ "items": { "type": "string", "minLength": 1, "maxLength": 200 },
853
+ "maxItems": 50,
854
+ "description": "Users or groups who may decide (by login or group name); absent: whoever the runner lets approve."
855
+ },
856
+ "notify": {
857
+ "type": "array",
858
+ "items": { "type": "string", "minLength": 1, "maxLength": 200 },
859
+ "maxItems": 50,
860
+ "description": "Users or groups told the approval waits, beside the approvers."
861
+ },
862
+ "message": {
863
+ "type": "string",
864
+ "maxLength": 2000,
865
+ "description": "What the approvers read: what to check before deciding."
866
+ }
867
+ }
868
+ },
869
+ "settings": {
870
+ "type": "object",
871
+ "properties": {
872
+ "max_fail_percentage": {
873
+ "type": "number",
874
+ "description": "Fail the whole node when more than this share of hosts fail."
875
+ },
876
+ "serial": {
877
+ "type": [
878
+ "string",
879
+ "integer"
880
+ ],
881
+ "description": "Batch size or percentage for rolling execution."
882
+ },
883
+ "rolling": {
884
+ "type": [
885
+ "string",
886
+ "integer"
887
+ ],
888
+ "pattern": "^[0-9]+%$",
889
+ "minimum": 1,
890
+ "description": "Subflows: hosts per batch (a number, or a percentage like 25%) through every step inside, one batch after another. The steps run in one play with this serial; a step that needs plays of its own (a subflow, approval, parallel, join, playbook binding, inventory_target, or its own serial or max_fail_percentage) stops it (rolling-unsupported)."
891
+ },
892
+ "timeout": {
893
+ "type": "string",
894
+ "description": "Limit for one try, e.g. 300, 30s or 5m; a try that runs over ends the step, and its hosts leave through the timeout port. On a step it may be given at run time as a Jinja template of whole seconds, e.g. \"{{ drain_limit }}\" reading a node input; an approval's timeout is always a duration."
895
+ },
896
+ "retries": {
897
+ "type": [
898
+ "integer",
899
+ "string"
900
+ ],
901
+ "pattern": "^\\s*\\{\\{[\\s\\S]*\\}\\}\\s*$",
902
+ "description": "Retries after the first try (module steps): the task runs once, then up to retries more times before a host fails (retries 12: 13 tries). Without until, a step stops retrying on its first success. A number, or a Jinja template given at run time, e.g. \"{{ drain_tries }}\" reading a node input."
903
+ },
904
+ "delay": {
905
+ "type": [
906
+ "integer",
907
+ "string"
908
+ ],
909
+ "minimum": 0,
910
+ "pattern": "^\\s*\\{\\{[\\s\\S]*\\}\\}\\s*$",
911
+ "description": "Seconds between tries (Ansible delay, default 5). A step polls for at most (retries + 1) x timeout + retries x delay. A number, or a Jinja template given at run time, e.g. \"{{ drain_delay }}\" reading a node input."
912
+ },
913
+ "until": {
914
+ "type": "string",
915
+ "description": "Poll until this holds: a Jinja test without braces, e.g. wait_ha_result.json.results | length == 2. It reads the step's registered result (impl.register, else <key with _ for ->_result) and its inputs. Module steps only; retries sets the attempts."
916
+ },
917
+ "become": {
918
+ "type": "boolean",
919
+ "description": "Run with privilege escalation. Format 2: set on a subflow, it applies to the steps inside (the nearest setting wins)."
920
+ },
921
+ "become_user": {
922
+ "type": "string",
923
+ "description": "Format 2: whom to become (Ansible become_user); set on a subflow, it applies inside. Format 1 writes it as a task keyword."
924
+ },
925
+ "credential": {
926
+ "type": "string",
927
+ "description": "AWX credential name (AWX runs only)."
928
+ },
929
+ "execution_environment": {
930
+ "type": "string",
931
+ "description": "AWX execution environment name."
932
+ },
933
+ "inventory_target": {
934
+ "type": "string",
935
+ "description": "Run the node's work on this host pattern instead of the arriving hosts (they leave together afterwards)."
936
+ },
937
+ "tags": {
938
+ "type": "array",
939
+ "items": {
940
+ "type": "string"
941
+ },
942
+ "description": "Extra Ansible tags for the generated play."
943
+ }
944
+ },
945
+ "description": "How the node runs (play keywords)."
946
+ },
947
+ "subflow": {
948
+ "type": "object",
949
+ "properties": {
950
+ "nodes": {
951
+ "type": "array",
952
+ "items": {
953
+ "$ref": "#/$defs/node"
954
+ },
955
+ "description": "Nodes of the inner level."
956
+ },
957
+ "edges": {
958
+ "type": "array",
959
+ "items": {
960
+ "$ref": "#/$defs/edge"
961
+ },
962
+ "description": "Wires of the inner level."
963
+ },
964
+ "annotations": {
965
+ "type": "array",
966
+ "items": {
967
+ "$ref": "#/$defs/annotation"
968
+ },
969
+ "description": "Format 2: Notes, Sections and Text on the inner level."
970
+ },
971
+ "layout": {
972
+ "$ref": "#/$defs/layout",
973
+ "description": "Old place for inner positions: read, never written (positions live in the top-level layout)."
974
+ },
975
+ "boundary": {
976
+ "type": "object",
977
+ "properties": {
978
+ "in": {
979
+ "$ref": "#/$defs/nodeRef",
980
+ "description": "The inner node that receives the hosts entering the subflow."
981
+ },
982
+ "outputs": {
983
+ "type": "object",
984
+ "additionalProperties": {
985
+ "type": "array",
986
+ "items": {
987
+ "$ref": "#/$defs/exitref"
988
+ },
989
+ "description": "Inner outputs leaving through this port."
990
+ },
991
+ "description": "Exits: a port of the subflow node (ok_hosts, failed_hosts, unreachable, …) or a named exit of its own (lowercase letters, digits and _, such as dry_run_done; it becomes a port of the subflow node) -> the inner outputs that leave through it."
992
+ }
993
+ },
994
+ "description": "How hosts enter and leave the subflow."
995
+ }
996
+ },
997
+ "description": "Subflow nodes: the inner level and how hosts enter and leave it."
998
+ }
999
+ },
1000
+ "additionalProperties": false,
1001
+ "description": "A step of the flow. Its type decides its ports; its status says how far it is built."
1002
+ },
1003
+ "exitref": {
1004
+ "type": "object",
1005
+ "required": [
1006
+ "node",
1007
+ "port"
1008
+ ],
1009
+ "properties": {
1010
+ "node": {
1011
+ "$ref": "#/$defs/nodeRef",
1012
+ "description": "The inner node: its ID, or its key while written by hand."
1013
+ },
1014
+ "port": {
1015
+ "type": "string",
1016
+ "pattern": "^[a-z][a-z0-9_]*$",
1017
+ "description": "The inner node's output port."
1018
+ },
1019
+ "reason": {
1020
+ "type": "string",
1021
+ "description": "Why hosts leave the subflow here (shown on the exit wire)"
1022
+ }
1023
+ },
1024
+ "additionalProperties": false,
1025
+ "description": "An inner output that leaves the subflow."
1026
+ }
1027
+ },
1028
+ "description": "An Ansible flow: a graph of typed nodes wired port to port. Hosts travel along the wires; every control port carries the hosts that took it. The designer edits this file; tools and AI assistants may write it too."
1029
+ }