Skip to content

First local job

A local job is useful for validating the engine before using SSH.

Create inventory.yaml:

servers:
  controller:
    host: 127.0.0.1

Create job.yaml:

apiVersion: automax.io/v1
kind: Job
metadata:
  name: first-local-job
tasks:
  - id: smoke
    targets: all
    steps:
      - id: local
        substeps:
          - id: hello
            use: command.local.run
            with:
              command: "printf hello"

Validate and run:

automax validate --job job.yaml --inventory inventory.yaml
automax plan --job job.yaml --inventory inventory.yaml
automax run --job job.yaml --inventory inventory.yaml --state-dir .automax/runs

Inspect:

automax runs list --state-dir .automax/runs
automax runs show <run-id> --state-dir .automax/runs