| 1 |
{ |
| 2 |
"$comment": "Generated from ansible.json, do not edit.", |
| 3 |
"$defs": { |
| 4 |
"become_method": { |
| 5 |
"anyOf": [ |
| 6 |
{ |
| 7 |
"enum": [ |
| 8 |
"ansible.builtin.sudo", |
| 9 |
"ansible.builtin.su", |
| 10 |
"community.general.pbrun", |
| 11 |
"community.general.pfexec", |
| 12 |
"ansible.builtin.runas", |
| 13 |
"community.general.dzdo", |
| 14 |
"community.general.ksu", |
| 15 |
"community.general.doas", |
| 16 |
"community.general.machinectl", |
| 17 |
"community.general.pmrun", |
| 18 |
"community.general.sesu", |
| 19 |
"community.general.sudosu" |
| 20 |
], |
| 21 |
"type": "string" |
| 22 |
}, |
| 23 |
{ |
| 24 |
"$ref": "#/$defs/full-jinja" |
| 25 |
}, |
| 26 |
{ |
| 27 |
"pattern": "[A-Za-z0-9_\\.]+", |
| 28 |
"type": "string" |
| 29 |
} |
| 30 |
], |
| 31 |
"markdownDescription": "See [become](https://docs.ansible.com/projects/ansible/latest/user_guide/become.html)", |
| 32 |
"title": "Become Method" |
| 33 |
}, |
| 34 |
"block": { |
| 35 |
"properties": { |
| 36 |
"always": { |
| 37 |
"items": { |
| 38 |
"anyOf": [ |
| 39 |
{ |
| 40 |
"$ref": "#/$defs/task" |
| 41 |
}, |
| 42 |
{ |
| 43 |
"$ref": "#/$defs/block" |
| 44 |
} |
| 45 |
] |
| 46 |
}, |
| 47 |
"title": "Always", |
| 48 |
"type": "array" |
| 49 |
}, |
| 50 |
"any_errors_fatal": { |
| 51 |
"$ref": "#/$defs/templated-boolean", |
| 52 |
"title": "Any Errors Fatal" |
| 53 |
}, |
| 54 |
"become": { |
| 55 |
"$ref": "#/$defs/templated-boolean", |
| 56 |
"title": "Become" |
| 57 |
}, |
| 58 |
"become_exe": { |
| 59 |
"title": "Become Exe", |
| 60 |
"type": "string" |
| 61 |
}, |
| 62 |
"become_flags": { |
| 63 |
"title": "Become Flags", |
| 64 |
"type": "string" |
| 65 |
}, |
| 66 |
"become_method": { |
| 67 |
"$ref": "#/$defs/become_method" |
| 68 |
}, |
| 69 |
"become_user": { |
| 70 |
"title": "Become User", |
| 71 |
"type": "string" |
| 72 |
}, |
| 73 |
"block": { |
| 74 |
"items": { |
| 75 |
"anyOf": [ |
| 76 |
{ |
| 77 |
"$ref": "#/$defs/task" |
| 78 |
}, |
| 79 |
{ |
| 80 |
"$ref": "#/$defs/block" |
| 81 |
} |
| 82 |
] |
| 83 |
}, |
| 84 |
"markdownDescription": "Blocks create logical groups of tasks. Blocks also offer ways to handle task errors, similar to exception handling in many programming languages. See [blocks](https://docs.ansible.com/projects/ansible/latest/user_guide/playbooks_blocks.html)", |
| 85 |
"title": "Block", |
| 86 |
"type": "array" |
| 87 |
}, |
| 88 |
"check_mode": { |
| 89 |
"$ref": "#/$defs/complex_conditional", |
| 90 |
"title": "Check Mode" |
| 91 |
}, |
| 92 |
"collections": { |
| 93 |
"items": { |
| 94 |
"type": "string" |
| 95 |
}, |
| 96 |
"title": "Collections", |
| 97 |
"type": "array" |
| 98 |
}, |
| 99 |
"connection": { |
| 100 |
"title": "Connection", |
| 101 |
"type": "string" |
| 102 |
}, |
| 103 |
"debugger": { |
| 104 |
"title": "Debugger", |
| 105 |
"type": "string" |
| 106 |
}, |
| 107 |
"delegate_facts": { |
| 108 |
"title": "Delegate Facts", |
| 109 |
"type": "boolean" |
| 110 |
}, |
| 111 |
"delegate_to": { |
| 112 |
"title": "Delegate To", |
| 113 |
"type": "string" |
| 114 |
}, |
| 115 |
"diff": { |
| 116 |
"$ref": "#/$defs/templated-boolean", |
| 117 |
"title": "Diff" |
| 118 |
}, |
| 119 |
"environment": { |
| 120 |
"$ref": "#/$defs/environment" |
| 121 |
}, |
| 122 |
"ignore_errors": { |
| 123 |
"$ref": "#/$defs/ignore_errors" |
| 124 |
}, |
| 125 |
"ignore_unreachable": { |
| 126 |
"$ref": "#/$defs/templated-boolean", |
| 127 |
"title": "Ignore Unreachable" |
| 128 |
}, |
| 129 |
"module_defaults": { |
| 130 |
"title": "Module Defaults" |
| 131 |
}, |
| 132 |
"name": { |
| 133 |
"title": "Name", |
| 134 |
"type": "string" |
| 135 |
}, |
| 136 |
"no_log": { |
| 137 |
"$ref": "#/$defs/templated-boolean" |
| 138 |
}, |
| 139 |
"port": { |
| 140 |
"$ref": "#/$defs/templated-integer" |
| 141 |
}, |
| 142 |
"remote_user": { |
| 143 |
"title": "Remote User", |
| 144 |
"type": "string" |
| 145 |
}, |
| 146 |
"rescue": { |
| 147 |
"items": { |
| 148 |
"anyOf": [ |
| 149 |
{ |
| 150 |
"$ref": "#/$defs/task" |
| 151 |
}, |
| 152 |
{ |
| 153 |
"$ref": "#/$defs/block" |
| 154 |
} |
| 155 |
] |
| 156 |
}, |
| 157 |
"title": "Rescue", |
| 158 |
"type": "array" |
| 159 |
}, |
| 160 |
"run_once": { |
| 161 |
"$ref": "#/$defs/templated-boolean", |
| 162 |
"title": "Run Once" |
| 163 |
}, |
| 164 |
"tags": { |
| 165 |
"$ref": "#/$defs/tags", |
| 166 |
"title": "Tags" |
| 167 |
}, |
| 168 |
"throttle": { |
| 169 |
"$ref": "#/$defs/templated-integer", |
| 170 |
"title": "Throttle" |
| 171 |
}, |
| 172 |
"timeout": { |
| 173 |
"$ref": "#/$defs/templated-integer", |
| 174 |
"title": "Timeout" |
| 175 |
}, |
| 176 |
"vars": { |
| 177 |
"title": "Vars", |
| 178 |
"type": "object" |
| 179 |
}, |
| 180 |
"when": { |
| 181 |
"$ref": "#/$defs/complex_conditional", |
| 182 |
"title": "When" |
| 183 |
} |
| 184 |
}, |
| 185 |
"required": [ |
| 186 |
"block" |
| 187 |
], |
| 188 |
"type": "object" |
| 189 |
}, |
| 190 |
"complex_conditional": { |
| 191 |
"oneOf": [ |
| 192 |
{ |
| 193 |
"type": "boolean" |
| 194 |
}, |
| 195 |
{ |
| 196 |
"type": "string" |
| 197 |
}, |
| 198 |
{ |
| 199 |
"items": { |
| 200 |
"anyOf": [ |
| 201 |
{ |
| 202 |
"type": "boolean" |
| 203 |
}, |
| 204 |
{ |
| 205 |
"type": "string" |
| 206 |
} |
| 207 |
] |
| 208 |
}, |
| 209 |
"type": "array" |
| 210 |
} |
| 211 |
] |
| 212 |
}, |
| 213 |
"environment": { |
| 214 |
"anyOf": [ |
| 215 |
{ |
| 216 |
"additionalProperties": { |
| 217 |
"type": "string" |
| 218 |
}, |
| 219 |
"type": "object" |
| 220 |
}, |
| 221 |
{ |
| 222 |
"$ref": "#/$defs/full-jinja" |
| 223 |
} |
| 224 |
], |
| 225 |
"title": "Environment" |
| 226 |
}, |
| 227 |
"full-jinja": { |
| 228 |
"pattern": "^\\{[\\{%](.|[\r\n])*[\\}%]\\}$", |
| 229 |
"type": "string" |
| 230 |
}, |
| 231 |
"ignore_errors": { |
| 232 |
"$ref": "#/$defs/templated-boolean", |
| 233 |
"markdownDescription": "See [ignore_errors](https://docs.ansible.com/projects/ansible/latest/user_guide/playbooks_error_handling.html#ignoring-failed-commands)", |
| 234 |
"title": "Ignore Errors" |
| 235 |
}, |
| 236 |
"no_log": { |
| 237 |
"$ref": "#/$defs/templated-boolean", |
| 238 |
"markdownDescription": "Use for protecting sensitive data. See [no_log](https://docs.ansible.com/projects/ansible/latest/reference_appendices/logging.html)", |
| 239 |
"title": "no_log" |
| 240 |
}, |
| 241 |
"removed-include-module": { |
| 242 |
"markdownDescription": "See [include module](https://docs.ansible.com/projects/ansible/latest/collections/ansible/builtin/include_module.html)", |
| 243 |
"not": {}, |
| 244 |
"title": "Replace 'include' with either 'ansible.builtin.include_tasks' or 'ansible.builtin.import_tasks'" |
| 245 |
}, |
| 246 |
"tags": { |
| 247 |
"anyOf": [ |
| 248 |
{ |
| 249 |
"type": "string" |
| 250 |
}, |
| 251 |
{ |
| 252 |
"items": { |
| 253 |
"type": "string" |
| 254 |
}, |
| 255 |
"type": "array" |
| 256 |
} |
| 257 |
], |
| 258 |
"title": "Tags" |
| 259 |
}, |
| 260 |
"task": { |
| 261 |
"additionalProperties": true, |
| 262 |
"allOf": [ |
| 263 |
{ |
| 264 |
"not": { |
| 265 |
"required": [ |
| 266 |
"hosts" |
| 267 |
] |
| 268 |
} |
| 269 |
}, |
| 270 |
{ |
| 271 |
"not": { |
| 272 |
"required": [ |
| 273 |
"tasks" |
| 274 |
] |
| 275 |
} |
| 276 |
}, |
| 277 |
{ |
| 278 |
"not": { |
| 279 |
"required": [ |
| 280 |
"import_playbook" |
| 281 |
] |
| 282 |
} |
| 283 |
}, |
| 284 |
{ |
| 285 |
"not": { |
| 286 |
"required": [ |
| 287 |
"block" |
| 288 |
] |
| 289 |
} |
| 290 |
} |
| 291 |
], |
| 292 |
"properties": { |
| 293 |
"action": { |
| 294 |
"title": "Action", |
| 295 |
"type": "string" |
| 296 |
}, |
| 297 |
"ansible.builtin.include": { |
| 298 |
"$ref": "#/$defs/removed-include-module" |
| 299 |
}, |
| 300 |
"ansible.legacy.include": { |
| 301 |
"$ref": "#/$defs/removed-include-module" |
| 302 |
}, |
| 303 |
"any_errors_fatal": { |
| 304 |
"$ref": "#/$defs/templated-boolean", |
| 305 |
"title": "Any Errors Fatal" |
| 306 |
}, |
| 307 |
"args": { |
| 308 |
"$ref": "#/$defs/templated-object", |
| 309 |
"title": "Args" |
| 310 |
}, |
| 311 |
"async": { |
| 312 |
"$ref": "#/$defs/templated-integer", |
| 313 |
"title": "Async" |
| 314 |
}, |
| 315 |
"become": { |
| 316 |
"$ref": "#/$defs/templated-boolean", |
| 317 |
"title": "Become" |
| 318 |
}, |
| 319 |
"become_exe": { |
| 320 |
"title": "Become Exe", |
| 321 |
"type": "string" |
| 322 |
}, |
| 323 |
"become_flags": { |
| 324 |
"title": "Become Flags", |
| 325 |
"type": "string" |
| 326 |
}, |
| 327 |
"become_method": { |
| 328 |
"$ref": "#/$defs/become_method" |
| 329 |
}, |
| 330 |
"become_user": { |
| 331 |
"title": "Become User", |
| 332 |
"type": "string" |
| 333 |
}, |
| 334 |
"changed_when": { |
| 335 |
"$ref": "#/$defs/complex_conditional", |
| 336 |
"markdownDescription": "See [changed_when](https://docs.ansible.com/projects/ansible/latest/user_guide/playbooks_error_handling.html#defining-changed)", |
| 337 |
"title": "Changed When" |
| 338 |
}, |
| 339 |
"check_mode": { |
| 340 |
"$ref": "#/$defs/complex_conditional", |
| 341 |
"title": "Check Mode" |
| 342 |
}, |
| 343 |
"collections": { |
| 344 |
"items": { |
| 345 |
"type": "string" |
| 346 |
}, |
| 347 |
"title": "Collections", |
| 348 |
"type": "array" |
| 349 |
}, |
| 350 |
"connection": { |
| 351 |
"title": "Connection", |
| 352 |
"type": "string" |
| 353 |
}, |
| 354 |
"debugger": { |
| 355 |
"title": "Debugger", |
| 356 |
"type": "string" |
| 357 |
}, |
| 358 |
"delay": { |
| 359 |
"$ref": "#/$defs/templated-integer", |
| 360 |
"title": "Delay" |
| 361 |
}, |
| 362 |
"delegate_facts": { |
| 363 |
"title": "Delegate Facts", |
| 364 |
"type": "boolean" |
| 365 |
}, |
| 366 |
"delegate_to": { |
| 367 |
"title": "Delegate To", |
| 368 |
"type": "string" |
| 369 |
}, |
| 370 |
"diff": { |
| 371 |
"$ref": "#/$defs/templated-boolean", |
| 372 |
"title": "Diff" |
| 373 |
}, |
| 374 |
"environment": { |
| 375 |
"$ref": "#/$defs/environment" |
| 376 |
}, |
| 377 |
"failed_when": { |
| 378 |
"$ref": "#/$defs/complex_conditional", |
| 379 |
"title": "Failed When" |
| 380 |
}, |
| 381 |
"ignore_errors": { |
| 382 |
"$ref": "#/$defs/ignore_errors" |
| 383 |
}, |
| 384 |
"ignore_unreachable": { |
| 385 |
"$ref": "#/$defs/templated-boolean", |
| 386 |
"title": "Ignore Unreachable" |
| 387 |
}, |
| 388 |
"include": { |
| 389 |
"$ref": "#/$defs/removed-include-module" |
| 390 |
}, |
| 391 |
"listen": { |
| 392 |
"anyOf": [ |
| 393 |
{ |
| 394 |
"type": "string" |
| 395 |
}, |
| 396 |
{ |
| 397 |
"items": { |
| 398 |
"type": "string" |
| 399 |
}, |
| 400 |
"type": "array" |
| 401 |
} |
| 402 |
], |
| 403 |
"markdownDescription": "Applies only to handlers. See [listen](https://docs.ansible.com/projects/ansible/latest/playbook_guide/playbooks_handlers.html)", |
| 404 |
"title": "Listen" |
| 405 |
}, |
| 406 |
"local_action": { |
| 407 |
"title": "Local Action", |
| 408 |
"type": [ |
| 409 |
"string", |
| 410 |
"object" |
| 411 |
] |
| 412 |
}, |
| 413 |
"loop": { |
| 414 |
"title": "Loop", |
| 415 |
"type": [ |
| 416 |
"string", |
| 417 |
"array" |
| 418 |
] |
| 419 |
}, |
| 420 |
"loop_control": { |
| 421 |
"title": "Loop Control" |
| 422 |
}, |
| 423 |
"module_defaults": { |
| 424 |
"title": "Module Defaults" |
| 425 |
}, |
| 426 |
"name": { |
| 427 |
"title": "Name", |
| 428 |
"type": "string" |
| 429 |
}, |
| 430 |
"no_log": { |
| 431 |
"$ref": "#/$defs/no_log" |
| 432 |
}, |
| 433 |
"notify": { |
| 434 |
"anyOf": [ |
| 435 |
{ |
| 436 |
"type": "string" |
| 437 |
}, |
| 438 |
{ |
| 439 |
"items": { |
| 440 |
"type": "string" |
| 441 |
}, |
| 442 |
"type": "array" |
| 443 |
} |
| 444 |
], |
| 445 |
"title": "Notify" |
| 446 |
}, |
| 447 |
"poll": { |
| 448 |
"$ref": "#/$defs/templated-integer", |
| 449 |
"title": "Poll" |
| 450 |
}, |
| 451 |
"port": { |
| 452 |
"$ref": "#/$defs/templated-integer", |
| 453 |
"title": "Port" |
| 454 |
}, |
| 455 |
"register": { |
| 456 |
"title": "Register", |
| 457 |
"type": "string" |
| 458 |
}, |
| 459 |
"remote_user": { |
| 460 |
"title": "Remote User", |
| 461 |
"type": "string" |
| 462 |
}, |
| 463 |
"retries": { |
| 464 |
"$ref": "#/$defs/templated-integer", |
| 465 |
"title": "Retries" |
| 466 |
}, |
| 467 |
"run_once": { |
| 468 |
"$ref": "#/$defs/templated-boolean", |
| 469 |
"title": "Run Once" |
| 470 |
}, |
| 471 |
"tags": { |
| 472 |
"$ref": "#/$defs/tags", |
| 473 |
"title": "Tags" |
| 474 |
}, |
| 475 |
"throttle": { |
| 476 |
"$ref": "#/$defs/templated-integer", |
| 477 |
"title": "Throttle" |
| 478 |
}, |
| 479 |
"timeout": { |
| 480 |
"$ref": "#/$defs/templated-integer", |
| 481 |
"title": "Timeout" |
| 482 |
}, |
| 483 |
"until": { |
| 484 |
"$ref": "#/$defs/complex_conditional", |
| 485 |
"title": "Until" |
| 486 |
}, |
| 487 |
"vars": { |
| 488 |
"title": "Vars", |
| 489 |
"type": "object" |
| 490 |
}, |
| 491 |
"when": { |
| 492 |
"$ref": "#/$defs/complex_conditional", |
| 493 |
"title": "When" |
| 494 |
}, |
| 495 |
"with_dict": { |
| 496 |
"title": "With Dict" |
| 497 |
}, |
| 498 |
"with_fileglob": { |
| 499 |
"title": "With Fileglob" |
| 500 |
}, |
| 501 |
"with_filetree": { |
| 502 |
"title": "With Filetree" |
| 503 |
}, |
| 504 |
"with_first_found": { |
| 505 |
"title": "With First Found" |
| 506 |
}, |
| 507 |
"with_indexed_items": { |
| 508 |
"title": "With Indexed Items" |
| 509 |
}, |
| 510 |
"with_ini": { |
| 511 |
"title": "With Ini" |
| 512 |
}, |
| 513 |
"with_inventory_hostnames": { |
| 514 |
"title": "With Inventory Hostnames" |
| 515 |
}, |
| 516 |
"with_items": { |
| 517 |
"anyOf": [ |
| 518 |
{ |
| 519 |
"$ref": "#/$defs/full-jinja" |
| 520 |
}, |
| 521 |
{ |
| 522 |
"type": "array" |
| 523 |
} |
| 524 |
], |
| 525 |
"markdownDescription": "See [loops](https://docs.ansible.com/projects/ansible/latest/user_guide/playbooks_loops.html#loops)", |
| 526 |
"title": "With Items" |
| 527 |
}, |
| 528 |
"with_lines": { |
| 529 |
"title": "With Lines" |
| 530 |
}, |
| 531 |
"with_random_choice": { |
| 532 |
"title": "With Random Choice" |
| 533 |
}, |
| 534 |
"with_sequence": { |
| 535 |
"title": "With Sequence" |
| 536 |
}, |
| 537 |
"with_subelements": { |
| 538 |
"title": "With Subelements" |
| 539 |
}, |
| 540 |
"with_together": { |
| 541 |
"title": "With Together" |
| 542 |
} |
| 543 |
}, |
| 544 |
"title": "task", |
| 545 |
"type": "object" |
| 546 |
}, |
| 547 |
"templated-boolean": { |
| 548 |
"oneOf": [ |
| 549 |
{ |
| 550 |
"type": "boolean" |
| 551 |
}, |
| 552 |
{ |
| 553 |
"$ref": "#/$defs/full-jinja", |
| 554 |
"type": "string" |
| 555 |
} |
| 556 |
] |
| 557 |
}, |
| 558 |
"templated-integer": { |
| 559 |
"oneOf": [ |
| 560 |
{ |
| 561 |
"type": "integer" |
| 562 |
}, |
| 563 |
{ |
| 564 |
"$ref": "#/$defs/full-jinja", |
| 565 |
"type": "string" |
| 566 |
} |
| 567 |
] |
| 568 |
}, |
| 569 |
"templated-object": { |
| 570 |
"oneOf": [ |
| 571 |
{ |
| 572 |
"type": "object" |
| 573 |
}, |
| 574 |
{ |
| 575 |
"$ref": "#/$defs/full-jinja", |
| 576 |
"type": "string" |
| 577 |
} |
| 578 |
] |
| 579 |
} |
| 580 |
}, |
| 581 |
"$id": "https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/tasks.json", |
| 582 |
"$schema": "http://json-schema.org/draft-07/schema", |
| 583 |
"examples": [ |
| 584 |
"tasks/*.yml", |
| 585 |
"handlers/*.yml" |
| 586 |
], |
| 587 |
"items": { |
| 588 |
"anyOf": [ |
| 589 |
{ |
| 590 |
"$ref": "#/$defs/block" |
| 591 |
}, |
| 592 |
{ |
| 593 |
"$ref": "#/$defs/task" |
| 594 |
} |
| 595 |
] |
| 596 |
}, |
| 597 |
"title": "Ansible Tasks Schema", |
| 598 |
"type": [ |
| 599 |
"array", |
| 600 |
"null" |
| 601 |
] |
| 602 |
} |