Tacoscript - execute tasks with ease
Toggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Run Tacoscripts

Create and run your first script

Take your preferred text editor and create a plain text file yummy-taco.yml.

new-file:
  file.managed:
    - name: my-file.txt
    - contents: |
        I love tacos.
        I can eat them all days.        

Now execute the file by invoking tacoscript yummy-taco.yml. You will get an output like this:

results:
- ID: new-file
  Function: file.managed
  Name: my-file.txt
  Result: true
  Comment: File my-file.txt updated
  Started: "14:18:31.994407"
  Duration: 3.1106ms
  Changes:
    diff: |
      expected: ""I love tacos.\nI can eat them all days.""
      actual: """"
      Diff:
      --- Expected
      +++ Actual
      -I love tacos.
      -I can eat them all days.
      +
    length: 38 bytes written
summary:
  Script: .\playground.yml
  Succeeded: 1
  Failed: 0
  Aborted: 0
  Changes: 0
  TotalTasksRun: 1
  TotalRunTime: 6.1952ms

Now run the tacoscript again. Note that the file has not overwritten or changed, because the content of the file is already in the desired state.

Structure of a tacoscript file

A tacoscript file consist of one or many tasks. Each task must have a unique task id (per file). Each task starts with a function and many optional parameters can follow.

Script structure
Script structure

Remember that yaml only allows indentation by blank space. Never use tabs!

You can freely choose by how many blank spaces you want to indent.