Skip to content
Vic Shóstak edited this page Jul 4, 2023 · 3 revisions

Welcome to the yatr wiki!

Here we'll look at general guidelines for creating a task file.

File with tasks

As previously noted, you can use any file format for tasks. Currently, yatr supports the following formats:

  • JSON
  • YAML
  • TOML
  • Terraform, HCL

In this case, the structure of the task file will be the same for all formats. Let's take the YAML file format as an example:

name: My tasks set
description: This is my set of tasks

tasks:

  - name: async task 1
    description: print string from the async task 1
    is_async: true
    is_sudo: false
    is_print_output: true
    exec:
      - echo
      - hello, async task 1!

Structure for tasks set:

Option Description Type Is required? Default value
name Name of tasks set string yes
description Description of tasks set string no ""
tasks List with single tasks objects list yes

Structure for the single task:

Option Description Type Is required? Default value
name Name of the single task string yes
description Description of the single task string no ""
is_async Marker for run the single task in async mode boolean no false
is_sudo Marker for run the single task by the sudo user boolean no false
is_print_output Marker for run the single task with print output boolean no false
exec List with strings (command and arguments) to execute for the single task list yes
Clone this wiki locally