{
  "name": "lab-rollback",
  "stop_on_error": true,
  "undo_on_error": true,
  "steps": [
    {
      "id": "1",
      "undo": false,
      "action_type": "SHELL",
      "code": "test ! -e '{{input.lab_directory}}/marker' && test ! -L '{{input.lab_directory}}/marker' && touch '{{input.lab_directory}}/marker'",
      "undo_on_error": false,
      "schema": {
        "input": {
          "lab_directory": {
            "type": "string",
            "pattern": "^/([A-Za-z0-9_.-]+/)*dm-tutorial-[A-Za-z0-9_-]+$"
          }
        },
        "required": ["lab_directory"]
      },
      "target": "all",
      "parent_step_ids": [],
      "expected_rc": 0
    },
    {
      "id": "2",
      "undo": false,
      "action_type": "SHELL",
      "code": "false",
      "target": "all",
      "parent_step_ids": [
        "1"
      ],
      "expected_rc": 0
    },
    {
      "id": "3",
      "undo": true,
      "action_type": "SHELL",
      "code": "rm -f '{{input.lab_directory}}/marker'",
      "schema": {
        "input": {
          "lab_directory": {
            "type": "string",
            "pattern": "^/([A-Za-z0-9_.-]+/)*dm-tutorial-[A-Za-z0-9_-]+$"
          }
        },
        "required": ["lab_directory"]
      },
      "parent_step_ids": [
        "1"
      ],
      "expected_rc": 0
    }
  ]
}
