# Semaphore UI

> Run your Ansible playbooks, Terraform and OpenTofu code and scripts from Semaphore UI: run task templates with variables and wait for them, follow, stop and read tasks, keep templates, inventories, variable groups, keys, repositories and schedules up to date, and start a workflow when a task finishes, fails or starts.

App · 39 actions. Web page: https://docs.lodol.com/docs/integrations/semaphore-ui

## Actions

### Create inventory

Add an inventory to a project: hosts typed in Ansible's INI or YAML format, or an inventory file in a repository, with the key used to sign in to them.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Name (`name`, text, required): What to call the inventory, such as Web servers.
- Type (`inventory_type`, text): Where the hosts come from. One of: `static` (Hosts typed here, in INI format), `static-yaml` (Hosts typed here, in YAML format), `file` (A file in a repository). Default: `static`.
- Hosts (`inventory`, text, required): The hosts, as an Ansible inventory, one per line, such as web1.example.com; for a file inventory, the file's path in the repository.
- Key (`key_id`, text, required): The key Semaphore UI signs in to the hosts with. Every project has one called None for hosts that need none.
- Sudo key (`become_key_id`, text): The key used to become root on the hosts, if they ask for a password.
- Repository (`repository_id`, text): For a file inventory, the repository the file is in.

**Outputs**

- `become_key_id` (number): The ID of the key used to become root; 0 if none
- `id` (number): The inventory's ID
- `inventory` (text): The hosts, or the file's path for a file inventory
- `key_id` (number): The ID of the key used to sign in to the hosts
- `name` (text): The inventory's name
- `project_id` (number): The ID of the project it's in
- `repository_id` (number): The repository a file inventory is in; 0 otherwise
- `type` (text): static (hosts in INI format), static-yaml (hosts in YAML), file (a file in a repository) or terraform-workspace

**Example output**

```json
{
  "become_key_id": 0,
  "id": 3,
  "inventory": "[web]\nweb1.example.com\nweb2.example.com",
  "key_id": 5,
  "name": "Web servers",
  "project_id": 1,
  "repository_id": 0,
  "type": "static"
}
```

### Create key

Add a key to a project's Key Store: a login with a password, an SSH private key, or an empty one for hosts and repositories that need none. Semaphore UI stores the secret encrypted.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Name (`name`, text, required): What to call the key, such as Deploy key.
- Type (`key_type`, text): What kind of key it is. One of: `none` (None (no secret)), `login_password` (Login with password), `ssh` (SSH key). Default: `none`.
- Login (`login`, text): The user name to sign in as. Optional for an SSH key. Only when Type is Login with password or SSH key.
- Password (`password`, text): The password. Only when Type is Login with password.
- Private key (`private_key`, text): The whole private key as text, starting with -----BEGIN. Only when Type is SSH key.
- Passphrase (`passphrase`, text): The private key's passphrase, if it has one. Only when Type is SSH key.

**Outputs**

- `id` (number): The key's ID
- `name` (text): The key's name
- `project_id` (number): The ID of the project it's in
- `type` (text): none, login_password, ssh or string

**Example output**

```json
{
  "id": 5,
  "name": "Deploy key",
  "project_id": 1,
  "type": "ssh"
}
```

### Create project

Make a new, empty project, owned by the token's user. Semaphore UI gives it a key called None to start with.

**Inputs**

- Name (`name`, text, required): What to call the project, such as Infrastructure.
- Tasks at once (`max_parallel_tasks`, number): The most tasks the project runs at the same time. Leave blank for no limit. From 0 to 1000.

**Outputs**

- `alerts_enabled` (true/false): Whether it sends alerts when tasks fail
- `created` (text): When it was made (ISO 8601)
- `id` (number): The project's ID, as the other steps take it
- `link` (text): A link to the project in Semaphore UI
- `max_parallel_tasks` (number): How many tasks it runs at once; 0 for no limit of its own
- `name` (text): The project's name

**Example output**

```json
{
  "alerts_enabled": false,
  "created": "2026-01-12T08:30:00Z",
  "id": 1,
  "link": "https://semaphore.example.com/project/1/history",
  "max_parallel_tasks": 0,
  "name": "Infrastructure"
}
```

### Create repository

Add a repository to a project: a Git repository by its address and branch, or a folder on the Semaphore UI server, with the key used to read it.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Name (`name`, text, required): What to call the repository, such as Playbooks.
- URL or path (`git_url`, text, required): The Git repository's address, such as git@github.com:acme/playbooks.git, or a folder on the Semaphore UI server, such as /opt/playbooks.
- Branch (`git_branch`, text): The branch to use, such as main. Leave blank for a folder.
- Key (`key_id`, text, required): The key Semaphore UI reads the repository with. Every project has one called None for a repository that needs none.

**Outputs**

- `git_branch` (text): The branch it uses; empty for a folder
- `git_url` (text): Its address, or a folder on the Semaphore UI server
- `id` (number): The repository's ID
- `key_id` (number): The ID of the key used to read it
- `name` (text): The repository's name
- `project_id` (number): The ID of the project it's in

**Example output**

```json
{
  "git_branch": "main",
  "git_url": "git@github.com:acme/playbooks.git",
  "id": 2,
  "key_id": 5,
  "name": "Playbooks",
  "project_id": 1
}
```

### Create schedule

Run a task template on a schedule, such as every night at 03:00, on or off to start with.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Task template (`template_id`, text, required): The task template: pick one, or paste its ID or a link to its page.
- Name (`name`, text, required): What to call the schedule, such as Nightly deploy.
- Cron (`cron`, text, required): When to run, in cron's five fields (minute, hour, day of month, month, day of week), such as 0 3 * * * for every day at 03:00, in the Semaphore UI server's time zone.
- On (`active`, true/false): Whether the schedule starts on. Off makes it without running anything yet. Default: `true`.

**Outputs**

- `active` (true/false): Whether it is on
- `cron` (text): When it runs, in cron's five fields, such as 0 3 * * *
- `id` (number): The schedule's ID
- `name` (text): The schedule's name
- `project_id` (number): The ID of the project it's in
- `template_id` (number): The ID of the task template it runs
- `template_name` (text): That template's name

**Example output**

```json
{
  "active": true,
  "cron": "0 3 * * *",
  "id": 9,
  "name": "Nightly deploy",
  "project_id": 1,
  "template_id": 7,
  "template_name": "Deploy web"
}
```

### Create task template

Make a task template: a playbook, Terraform or OpenTofu code or a script in a repository, with the inventory and variable group it runs with, the variables a run is asked for and what a run may change.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Name (`name`, text, required): What to call the template, such as Deploy web.
- Runs (`app`, text): What the template runs. One of: `ansible` (Ansible playbook), `terraform` (Terraform code), `tofu` (OpenTofu code), `terragrunt` (Terragrunt code), `bash` (Bash script), `powershell` (PowerShell script), `python` (Python script). Default: `ansible`.
- File (`playbook`, text, required): The playbook or script to run, as its path in the repository, such as deploy.yml; for Terraform or OpenTofu, the folder of the code.
- Repository (`repository_id`, text, required): The repository the file is in.
- Inventory (`inventory_id`, text): The hosts to run on. An Ansible playbook needs one.
- Variable group (`variable_group_id`, text): The variable group whose values every run gets.
- Description (`description`, text): What the template is for.
- Git branch (`git_branch`, text): The branch to run from instead of the repository's own.
- Arguments (`arguments`, text): Extra command-line arguments every run gets, as you'd type them, such as --forks 10.
- Survey variables (`survey_variables`, text): The variables a run is asked for, by name, separated by commas, such as app_version, region.
- Runs can change (`run_can_change`, list): What a single run may change. Semaphore UI ignores these on a run unless they're allowed here. One or more of: `arguments` (Extra command-line arguments), `branch` (The Git branch), `limit` (The hosts it's limited to), `tags` (The tags it runs), `skip_tags` (The tags it skips), `inventory` (The inventory), `debug` (Debug output).

**Outputs**

- `app` (text): What it runs: ansible, terraform, tofu, terragrunt, bash, powershell or python
- `arguments` (list): Extra command-line arguments it always runs with
- `description` (text): Its description; empty if none
- `git_branch` (text): The branch it runs from; empty for the repository's own
- `id` (number): The task template's ID, as the other steps take it
- `inventory_id` (number): The ID of the inventory it runs on; 0 if none
- `last_task_id` (number): The ID of its latest task; 0 if it has never run
- `last_task_status` (text): That task's status; empty if it has never run
- `link` (text): A link to the template in Semaphore UI
- `name` (text): The template's name
- `playbook` (text): The file it runs, as its path in the repository
- `project_id` (number): The ID of the project it's in
- `repository_id` (number): The ID of the repository the file is in
- `run_can_change` (list): What a run may change: arguments, branch, limit, tags, skip_tags, inventory or debug
- `survey_variables` (list): The variables a run is asked for (its survey)
- `task_count` (number): How many tasks it has run
- `variable_group_id` (number): The ID of its variable group; 0 if none

**Example output**

```json
{
  "app": "ansible",
  "arguments": [],
  "description": "Deploys the web app to the web servers",
  "git_branch": "",
  "id": 7,
  "inventory_id": 3,
  "last_task_id": 123,
  "last_task_status": "success",
  "link": "https://semaphore.example.com/project/1/templates/7",
  "name": "Deploy web",
  "playbook": "deploy.yml",
  "project_id": 1,
  "repository_id": 2,
  "run_can_change": [
    "limit",
    "debug"
  ],
  "survey_variables": [
    {
      "description": "The version to deploy",
      "name": "app_version",
      "required": true,
      "title": "Version",
      "type": "string"
    }
  ],
  "task_count": 12,
  "variable_group_id": 4
}
```

### Create variable group

Add a variable group to a project: extra variables, environment variables and secret variables that the task templates using it run with.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Name (`name`, text, required): What to call the variable group, such as Production.
- Extra variables (`variables`, object): Variables every run gets, by name, such as {"app_version": "1.4.2"}.
- Environment variables (`environment_variables`, object): Environment variables every run gets, such as {"TZ": "UTC"}.
- Secret variables (`secret_variables`, object): Variables kept secret, by name: Semaphore UI stores them encrypted and never shows them again.

**Outputs**

- `environment_variables` (object): Its environment variables, by name
- `id` (number): The variable group's ID
- `name` (text): The variable group's name
- `project_id` (number): The ID of the project it's in
- `secret_names` (list): The names of its secret values; Semaphore UI never gives the values
- `variables` (object): Its extra variables, by name

**Example output**

```json
{
  "environment_variables": {
    "ANSIBLE_FORCE_COLOR": "1"
  },
  "id": 4,
  "name": "Production",
  "project_id": 1,
  "secret_names": [
    "db_password"
  ],
  "variables": {
    "app_env": "production"
  }
}
```

### Delete inventory

Delete an inventory. Semaphore UI refuses while a task template uses it; one that isn't there is left as it is.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Inventory (`inventory_id`, text, required): The inventory: pick one, or paste its ID.

**Outputs**

- `deleted` (true/false): Whether it was deleted; false if there was nothing to delete
- `id` (number): The inventory's ID
- `project_id` (number): The ID of the project it's in

**Example output**

```json
{
  "deleted": true,
  "id": 3,
  "project_id": 1
}
```

### Delete key

Delete a key from a project's Key Store. Semaphore UI refuses while an inventory, repository or task template uses it; one that isn't there is left as it is.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Key (`key_id`, text, required): The key: pick one, or paste its ID.

**Outputs**

- `deleted` (true/false): Whether it was deleted; false if there was nothing to delete
- `id` (number): The key's ID
- `project_id` (number): The ID of the project it's in

**Example output**

```json
{
  "deleted": true,
  "id": 5,
  "project_id": 1
}
```

### Delete project

Delete a project with everything in it: its task templates, tasks and their logs, inventories, variable groups, keys, repositories and schedules. This can't be undone. A project that isn't there is left as it is.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.

**Outputs**

- `deleted` (true/false): Whether it was deleted; false if there was nothing to delete
- `id` (number): The project's ID

**Example output**

```json
{
  "deleted": true,
  "id": 1
}
```

### Delete repository

Delete a repository from a project. Semaphore UI refuses while a task template uses it; one that isn't there is left as it is.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Repository (`repository_id`, text, required): The repository: pick one, or paste its ID.

**Outputs**

- `deleted` (true/false): Whether it was deleted; false if there was nothing to delete
- `id` (number): The repository's ID
- `project_id` (number): The ID of the project it's in

**Example output**

```json
{
  "deleted": true,
  "id": 2,
  "project_id": 1
}
```

### Delete schedule

Delete a schedule, so its task template no longer runs by itself. One that isn't there is left as it is.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Schedule (`schedule_id`, text, required): The schedule's ID, as 'List schedules' and 'Create schedule' give it.

**Outputs**

- `deleted` (true/false): Whether it was deleted; false if there was nothing to delete
- `id` (number): The schedule's ID
- `project_id` (number): The ID of the project it's in

**Example output**

```json
{
  "deleted": true,
  "id": 9,
  "project_id": 1
}
```

### Delete task

Delete a finished task and its log from the project's history. Only an administrator's token may; a task still waiting or running must be stopped first, and one that isn't there is left as it is.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Task (`task_id`, text, required): The task's number, as Semaphore UI shows it (#123), or a link to it. 'Run template' gives it as id.

**Outputs**

- `deleted` (true/false): Whether it was deleted; false if there was nothing to delete
- `id` (number): The task's ID
- `project_id` (number): The ID of the project it's in

**Example output**

```json
{
  "deleted": true,
  "id": 123,
  "project_id": 1
}
```

### Delete task template

Delete a task template, with its tasks, their logs and its schedules. One that isn't there is left as it is.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Task template (`template_id`, text, required): The task template: pick one, or paste its ID or a link to its page.

**Outputs**

- `deleted` (true/false): Whether it was deleted; false if there was nothing to delete
- `id` (number): The task template's ID
- `project_id` (number): The ID of the project it's in

**Example output**

```json
{
  "deleted": true,
  "id": 7,
  "project_id": 1
}
```

### Delete variable group

Delete a variable group. Task templates that used it run without its values. One that isn't there is left as it is.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Variable group (`variable_group_id`, text, required): The variable group: pick one, or paste its ID.

**Outputs**

- `deleted` (true/false): Whether it was deleted; false if there was nothing to delete
- `id` (number): The variable group's ID
- `project_id` (number): The ID of the project it's in

**Example output**

```json
{
  "deleted": true,
  "id": 4,
  "project_id": 1
}
```

### Get inventory

Get an inventory: its hosts as text (or the file they're in), its type and the keys used to reach them.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Inventory (`inventory_id`, text, required): The inventory: pick one, or paste its ID.

**Outputs**

- `become_key_id` (number): The ID of the key used to become root; 0 if none
- `id` (number): The inventory's ID
- `inventory` (text): The hosts, or the file's path for a file inventory
- `key_id` (number): The ID of the key used to sign in to the hosts
- `name` (text): The inventory's name
- `project_id` (number): The ID of the project it's in
- `repository_id` (number): The repository a file inventory is in; 0 otherwise
- `type` (text): static (hosts in INI format), static-yaml (hosts in YAML), file (a file in a repository) or terraform-workspace

**Example output**

```json
{
  "become_key_id": 0,
  "id": 3,
  "inventory": "[web]\nweb1.example.com\nweb2.example.com",
  "key_id": 5,
  "name": "Web servers",
  "project_id": 1,
  "repository_id": 0,
  "type": "static"
}
```

### Get project

Get a project's name, settings and link, with the token's user's role in it and how many task templates it has.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.

**Outputs**

- `alerts_enabled` (true/false): Whether it sends alerts when tasks fail
- `created` (text): When it was made (ISO 8601)
- `id` (number): The project's ID, as the other steps take it
- `link` (text): A link to the project in Semaphore UI
- `max_parallel_tasks` (number): How many tasks it runs at once; 0 for no limit of its own
- `name` (text): The project's name
- `role` (text): The token's user's role in it: owner, manager, task_runner or guest
- `template_count` (number): How many task templates it has

**Example output**

```json
{
  "alerts_enabled": false,
  "created": "2026-01-12T08:30:00Z",
  "id": 1,
  "link": "https://semaphore.example.com/project/1/history",
  "max_parallel_tasks": 0,
  "name": "Infrastructure",
  "role": "owner",
  "template_count": 4
}
```

### Get task

Get a task: its status, whether it's over and succeeded, who started it and when, how long it ran and what it was run with.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Task (`task_id`, text, required): The task's number, as Semaphore UI shows it (#123), or a link to it. 'Run template' gives it as id.

**Outputs**

- `arguments` (list): The extra command-line arguments it was given
- `commit_hash` (text): The Git commit it ran from, once known
- `created` (text): When it was queued (ISO 8601)
- `debug` (true/false): Whether it ran with debug output
- `diff` (true/false): Whether it showed what would change (Ansible's diff)
- `dry_run` (true/false): Whether it was a dry run (Ansible's check mode)
- `duration_seconds` (number): How long it ran, or has run so far, in seconds
- `ended` (text): When it finished (ISO 8601); empty until it does
- `finished` (true/false): Whether it is over (success, error or stopped)
- `git_branch` (text): The branch the run asked for; empty for the template's
- `id` (number): The task's ID, the number Semaphore UI shows (#123)
- `inventory_id` (number): The inventory the run asked for; 0 for the template's
- `limit` (text): The hosts it was limited to, comma-separated; empty for all
- `link` (text): A link to the task in Semaphore UI
- `message` (text): The message it was started with; empty if none
- `playbook` (text): The file it ran, when the run or its listing says
- `project_id` (number): The ID of the project it's in
- `schedule_id` (number): The schedule that started it; 0 if none did
- `started` (text): When it started (ISO 8601); empty until it does
- `status` (text): waiting, starting, running, stopping, success, error (it failed), stopped, or waiting_confirmation, confirmed or rejected for a Terraform plan awaiting approval
- `succeeded` (true/false): Whether it succeeded
- `template_id` (number): The ID of the task template it ran
- `template_name` (text): That template's name
- `user_id` (number): The ID of the user who started it; 0 for a schedule
- `user_name` (text): That user's name, where Semaphore UI gives it
- `variables` (object): The extra variables and survey values it was given

**Example output**

```json
{
  "arguments": [],
  "commit_hash": "9f2c1e7",
  "created": "2026-01-31T09:00:00Z",
  "debug": false,
  "diff": false,
  "dry_run": false,
  "duration_seconds": 42.0,
  "ended": "2026-01-31T09:00:43Z",
  "finished": true,
  "git_branch": "",
  "id": 123,
  "inventory_id": 0,
  "limit": "web1,web2",
  "link": "https://semaphore.example.com/project/1/history?t=123",
  "message": "Release 1.4.2",
  "playbook": "deploy.yml",
  "project_id": 1,
  "schedule_id": 0,
  "started": "2026-01-31T09:00:01Z",
  "status": "success",
  "succeeded": true,
  "template_id": 7,
  "template_name": "Deploy web",
  "user_id": 1,
  "user_name": "Ada Admin",
  "variables": {
    "app_version": "1.4.2"
  }
}
```

### Get task output

Read the end of a task's log as text, what Semaphore UI shows on the task's page, to send on or look through for an error. It works while the task is still running.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Task (`task_id`, text, required): The task's number, as Semaphore UI shows it (#123), or a link to it. 'Run template' gives it as id.
- Lines (`max_lines`, number): How many lines from the end to give, 1 to 5000. Defaults to 200. From 1 to 5000.

**Outputs**

- `finished` (true/false): Whether the task is over, so the log is complete
- `line_count` (number): How many lines are given
- `output` (text): The end of the log, one line per line
- `project_id` (number): The ID of the project it's in
- `status` (text): The task's status
- `task_id` (number): The task's ID
- `total_lines` (number): How many lines the log has
- `truncated` (true/false): Whether the log has earlier lines that aren't given

**Example output**

```json
{
  "finished": true,
  "line_count": 2,
  "output": "PLAY RECAP\nweb1 : ok=4 changed=1 unreachable=0 failed=0",
  "project_id": 1,
  "status": "success",
  "task_id": 123,
  "total_lines": 2,
  "truncated": false
}
```

### Get task template

Get a task template: what it runs and where, the variables a run is asked for (its survey), what a run may change, and how its last task went.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Task template (`template_id`, text, required): The task template: pick one, or paste its ID or a link to its page.

**Outputs**

- `app` (text): What it runs: ansible, terraform, tofu, terragrunt, bash, powershell or python
- `arguments` (list): Extra command-line arguments it always runs with
- `description` (text): Its description; empty if none
- `git_branch` (text): The branch it runs from; empty for the repository's own
- `id` (number): The task template's ID, as the other steps take it
- `inventory_id` (number): The ID of the inventory it runs on; 0 if none
- `last_task_id` (number): The ID of its latest task; 0 if it has never run
- `last_task_status` (text): That task's status; empty if it has never run
- `link` (text): A link to the template in Semaphore UI
- `name` (text): The template's name
- `playbook` (text): The file it runs, as its path in the repository
- `project_id` (number): The ID of the project it's in
- `repository_id` (number): The ID of the repository the file is in
- `run_can_change` (list): What a run may change: arguments, branch, limit, tags, skip_tags, inventory or debug
- `survey_variables` (list): The variables a run is asked for (its survey)
- `task_count` (number): How many tasks it has run
- `variable_group_id` (number): The ID of its variable group; 0 if none

**Example output**

```json
{
  "app": "ansible",
  "arguments": [],
  "description": "Deploys the web app to the web servers",
  "git_branch": "",
  "id": 7,
  "inventory_id": 3,
  "last_task_id": 123,
  "last_task_status": "success",
  "link": "https://semaphore.example.com/project/1/templates/7",
  "name": "Deploy web",
  "playbook": "deploy.yml",
  "project_id": 1,
  "repository_id": 2,
  "run_can_change": [
    "limit",
    "debug"
  ],
  "survey_variables": [
    {
      "description": "The version to deploy",
      "name": "app_version",
      "required": true,
      "title": "Version",
      "type": "string"
    }
  ],
  "task_count": 12,
  "variable_group_id": 4
}
```

### Get variable group

Get a variable group's extra variables and environment variables, with the names of its secrets. Semaphore UI never gives a secret's value.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Variable group (`variable_group_id`, text, required): The variable group: pick one, or paste its ID.

**Outputs**

- `environment_variables` (object): Its environment variables, by name
- `id` (number): The variable group's ID
- `name` (text): The variable group's name
- `project_id` (number): The ID of the project it's in
- `secret_names` (list): The names of its secret values; Semaphore UI never gives the values
- `variables` (object): Its extra variables, by name

**Example output**

```json
{
  "environment_variables": {
    "ANSIBLE_FORCE_COLOR": "1"
  },
  "id": 4,
  "name": "Production",
  "project_id": 1,
  "secret_names": [
    "db_password"
  ],
  "variables": {
    "app_env": "production"
  }
}
```

### List events

List the latest activity, newest first, as a project's Activity tab shows it: tasks starting and finishing, and what was created, changed or deleted, with who did it. Leave the project blank for every project.

**Inputs**

- Project (`project_id`, text): Only this project's activity. Leave blank for every project the token's user is in.
- About (`object_type`, text): Only events about this kind of thing, such as task, template, inventory, environment (a variable group), key, repository or schedule.
- Limit (`limit`, number): How many events to give, 1 to 200. Defaults to 50. From 1 to 200.

**Outputs**

- `count` (number): How many are listed
- `events` (list): The events, newest first

**Example output**

```json
{
  "count": 1,
  "events": [
    {
      "created": "2026-01-31T09:00:43Z",
      "description": "Task ID 123 (Deploy web) finished with status SUCCESS",
      "object_id": 123,
      "object_name": "",
      "object_type": "task",
      "project_id": 1,
      "project_name": "Infrastructure",
      "user_id": 1,
      "username": "ada"
    }
  ]
}
```

### List inventories

List a project's inventories, the lists of hosts its task templates run on, with their hosts and keys.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.

**Outputs**

- `count` (number): How many are listed
- `inventories` (list): The inventories, by name
- `project_id` (number): The ID of the project it's in

**Example output**

```json
{
  "count": 1,
  "inventories": [
    {
      "become_key_id": 0,
      "id": 3,
      "inventory": "[web]\nweb1.example.com\nweb2.example.com",
      "key_id": 5,
      "name": "Web servers",
      "project_id": 1,
      "repository_id": 0,
      "type": "static"
    }
  ],
  "project_id": 1
}
```

### List keys

List the keys in a project's Key Store by name and type. Semaphore UI never gives a password or private key back.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.

**Outputs**

- `count` (number): How many are listed
- `keys` (list): The keys, by name, without their secrets
- `project_id` (number): The ID of the project it's in

**Example output**

```json
{
  "count": 1,
  "keys": [
    {
      "id": 5,
      "name": "Deploy key",
      "project_id": 1,
      "type": "ssh"
    }
  ],
  "project_id": 1
}
```

### List projects

List the Semaphore UI projects the token's user is in, by name, with the ID the other steps take.

**Inputs**: None.

**Outputs**

- `count` (number): How many are listed
- `projects` (list): The projects, by name

**Example output**

```json
{
  "count": 1,
  "projects": [
    {
      "alerts_enabled": false,
      "created": "2026-01-12T08:30:00Z",
      "id": 1,
      "link": "https://semaphore.example.com/project/1/history",
      "max_parallel_tasks": 0,
      "name": "Infrastructure"
    }
  ]
}
```

### List repositories

List a project's repositories, where its playbooks and code are read from, with their addresses, branches and keys.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.

**Outputs**

- `count` (number): How many are listed
- `project_id` (number): The ID of the project it's in
- `repositories` (list): The repositories, by name

**Example output**

```json
{
  "count": 1,
  "project_id": 1,
  "repositories": [
    {
      "git_branch": "main",
      "git_url": "git@github.com:acme/playbooks.git",
      "id": 2,
      "key_id": 5,
      "name": "Playbooks",
      "project_id": 1
    }
  ]
}
```

### List schedules

List a project's schedules, of every task template or one, with when each runs and whether it's on.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Task template (`template_id`, text): Only schedules of this template. Leave blank for every template.

**Outputs**

- `count` (number): How many are listed
- `project_id` (number): The ID of the project it's in
- `schedules` (list): The schedules, by template and name

**Example output**

```json
{
  "count": 1,
  "project_id": 1,
  "schedules": [
    {
      "active": true,
      "cron": "0 3 * * *",
      "id": 9,
      "name": "Nightly deploy",
      "project_id": 1,
      "template_id": 7,
      "template_name": "Deploy web"
    }
  ]
}
```

### List task templates

List or find a project's task templates by name and by what they run, with each one's file, inventory, last task and the ID 'Run template' takes.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Name contains (`name`, text): Only templates whose name has these letters, such as deploy.
- Runs (`app`, text): Only templates that run this. One of: `any` (Anything), `ansible` (Ansible playbook), `terraform` (Terraform code), `tofu` (OpenTofu code), `terragrunt` (Terragrunt code), `bash` (Bash script), `powershell` (PowerShell script), `python` (Python script). Default: `any`.

**Outputs**

- `count` (number): How many are listed
- `project_id` (number): The ID of the project it's in
- `templates` (list): The task templates, by name

**Example output**

```json
{
  "count": 1,
  "project_id": 1,
  "templates": [
    {
      "app": "ansible",
      "arguments": [],
      "description": "Deploys the web app to the web servers",
      "git_branch": "",
      "id": 7,
      "inventory_id": 3,
      "last_task_id": 123,
      "last_task_status": "success",
      "link": "https://semaphore.example.com/project/1/templates/7",
      "name": "Deploy web",
      "playbook": "deploy.yml",
      "project_id": 1,
      "repository_id": 2,
      "run_can_change": [
        "limit",
        "debug"
      ],
      "survey_variables": [
        {
          "description": "The version to deploy",
          "name": "app_version",
          "required": true,
          "title": "Version",
          "type": "string"
        }
      ],
      "task_count": 12,
      "variable_group_id": 4
    }
  ]
}
```

### List tasks

List a project's latest tasks, newest first, of every task template or one, optionally only those waiting, running, successful, failed or stopped.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Task template (`template_id`, text): Only tasks of this template. Leave blank for every template.
- Status (`status`, text): Only tasks in this state, looked for among the project's latest 200. One of: `any` (Any status), `waiting` (Waiting in the queue), `running`, `success`, `error` (Failed), `stopped`. Default: `any`.
- Limit (`limit`, number): How many tasks to give, 1 to 200. Defaults to 20. From 1 to 200.

**Outputs**

- `count` (number): How many are listed
- `project_id` (number): The ID of the project it's in
- `tasks` (list): The tasks, newest first

**Example output**

```json
{
  "count": 1,
  "project_id": 1,
  "tasks": [
    {
      "arguments": [],
      "commit_hash": "9f2c1e7",
      "created": "2026-01-31T09:00:00Z",
      "debug": false,
      "diff": false,
      "dry_run": false,
      "duration_seconds": 42.0,
      "ended": "2026-01-31T09:00:43Z",
      "finished": true,
      "git_branch": "",
      "id": 123,
      "inventory_id": 0,
      "limit": "web1,web2",
      "link": "https://semaphore.example.com/project/1/history?t=123",
      "message": "Release 1.4.2",
      "playbook": "deploy.yml",
      "project_id": 1,
      "schedule_id": 0,
      "started": "2026-01-31T09:00:01Z",
      "status": "success",
      "succeeded": true,
      "template_id": 7,
      "template_name": "Deploy web",
      "user_id": 1,
      "user_name": "Ada Admin",
      "variables": {
        "app_version": "1.4.2"
      }
    }
  ]
}
```

### List team members

List the people in a project's team with their roles: owner, manager, task runner or guest.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.

**Outputs**

- `count` (number): How many are listed
- `members` (list): The project's team, by name
- `project_id` (number): The ID of the project it's in

**Example output**

```json
{
  "count": 1,
  "members": [
    {
      "id": 1,
      "name": "Ada Admin",
      "role": "owner",
      "roles": [
        "owner"
      ],
      "username": "ada"
    }
  ],
  "project_id": 1
}
```

### List variable groups

List a project's variable groups (called environments in older versions): their extra variables, environment variables and the names of their secrets.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.

**Outputs**

- `count` (number): How many are listed
- `project_id` (number): The ID of the project it's in
- `variable_groups` (list): The variable groups, by name

**Example output**

```json
{
  "count": 1,
  "project_id": 1,
  "variable_groups": [
    {
      "environment_variables": {
        "ANSIBLE_FORCE_COLOR": "1"
      },
      "id": 4,
      "name": "Production",
      "project_id": 1,
      "secret_names": [
        "db_password"
      ],
      "variables": {
        "app_env": "production"
      }
    }
  ]
}
```

### Run task template

Start a task from a task template, as its Run button does, with a message, variables (its survey's answers too) and whatever else the template lets a run change. Turn on waiting to get how it went and the end of its log.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Task template (`template_id`, text, required): The task template: pick one, or paste its ID or a link to its page.
- Message (`message`, text): A note shown with the task, such as why it was run.
- Variables (`variables`, object): Variables for this run by name, such as {"app_version": "1.4.2"}: the template's survey answers, and extra variables for a playbook. 'Get task template' lists the survey.
- Git branch (`git_branch`, text): Run from this branch instead of the template's. Semaphore UI ignores it unless the template lets runs change it.
- Limit to hosts (`limit`, text): Run only on these hosts or groups, separated by commas, such as web1, web2. Semaphore UI ignores it unless the template lets runs change it.
- Tags (`tags`, text): Run only the parts of the playbook with these tags, separated by commas. Semaphore UI ignores it unless the template lets runs change it.
- Skip tags (`skip_tags`, text): Skip the parts of the playbook with these tags, separated by commas. Semaphore UI ignores it unless the template lets runs change it.
- Dry run (`dry_run`, true/false): Show what the playbook would do without changing anything (Ansible's check mode). Default: `false`.
- Show changes (`diff`, true/false): Show what each change alters in files and templates (Ansible's diff). Default: `false`.
- Debug output (`debug`, true/false): Log much more detail. Semaphore UI ignores it unless the template lets runs change it. Default: `false`.
- File (`playbook`, text): Run this file of the repository instead of the template's, such as rollback.yml.
- Arguments (`arguments`, text): Extra command-line arguments for this run, as you'd type them, such as --forks 10. Semaphore UI ignores it unless the template lets runs change it.
- Inventory (`inventory_id`, text): Run on this inventory instead of the template's. Semaphore UI ignores it unless the template lets runs change it.
- Wait for it to finish (`wait`, true/false): Wait until the task is over, then return how it went and the end of its log. Off returns as soon as it's queued. Default: `false`.
- Wait up to (minutes) (`max_wait_minutes`, number): How long to wait, 1 to 15 minutes. Defaults to 10. It keeps running in Semaphore UI after. Only when Wait for it to finish is `true`. From 1 to 15.

**Outputs**

- `arguments` (list): The extra command-line arguments it was given
- `commit_hash` (text): The Git commit it ran from, once known
- `created` (text): When it was queued (ISO 8601)
- `debug` (true/false): Whether it ran with debug output
- `diff` (true/false): Whether it showed what would change (Ansible's diff)
- `dry_run` (true/false): Whether it was a dry run (Ansible's check mode)
- `duration_seconds` (number): How long it ran, or has run so far, in seconds
- `ended` (text): When it finished (ISO 8601); empty until it does
- `finished` (true/false): Whether it is over (success, error or stopped)
- `git_branch` (text): The branch the run asked for; empty for the template's
- `id` (number): The task's ID, the number Semaphore UI shows (#123)
- `inventory_id` (number): The inventory the run asked for; 0 for the template's
- `limit` (text): The hosts it was limited to, comma-separated; empty for all
- `link` (text): A link to the task in Semaphore UI
- `message` (text): The message it was started with; empty if none
- `output` (text): The end of its log, once waited for; empty otherwise
- `playbook` (text): The file it ran, when the run or its listing says
- `project_id` (number): The ID of the project it's in
- `schedule_id` (number): The schedule that started it; 0 if none did
- `started` (text): When it started (ISO 8601); empty until it does
- `status` (text): waiting, starting, running, stopping, success, error (it failed), stopped, or waiting_confirmation, confirmed or rejected for a Terraform plan awaiting approval
- `succeeded` (true/false): Whether it succeeded
- `template_id` (number): The ID of the task template it ran
- `template_name` (text): That template's name
- `timed_out` (true/false): Whether it was still going when the wait was up
- `user_id` (number): The ID of the user who started it; 0 for a schedule
- `user_name` (text): That user's name, where Semaphore UI gives it
- `variables` (object): The extra variables and survey values it was given

**Example output**

```json
{
  "arguments": [],
  "commit_hash": "9f2c1e7",
  "created": "2026-01-31T09:00:00Z",
  "debug": false,
  "diff": false,
  "dry_run": false,
  "duration_seconds": 42.0,
  "ended": "2026-01-31T09:00:43Z",
  "finished": true,
  "git_branch": "",
  "id": 123,
  "inventory_id": 0,
  "limit": "web1,web2",
  "link": "https://semaphore.example.com/project/1/history?t=123",
  "message": "Release 1.4.2",
  "output": "PLAY RECAP\nweb1 : ok=4 changed=1 unreachable=0 failed=0",
  "playbook": "deploy.yml",
  "project_id": 1,
  "schedule_id": 0,
  "started": "2026-01-31T09:00:01Z",
  "status": "success",
  "succeeded": true,
  "template_id": 7,
  "template_name": "Deploy web",
  "timed_out": false,
  "user_id": 1,
  "user_name": "Ada Admin",
  "variables": {
    "app_version": "1.4.2"
  }
}
```

### Stop task

Stop a task that is waiting or running, as its Stop button does, and wait until it has stopped. A task that has already finished is left as it is.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Task (`task_id`, text, required): The task's number, as Semaphore UI shows it (#123), or a link to it. 'Run template' gives it as id.
- Force stop (`force`, true/false): Kill it at once instead of asking it to stop. Use it for a task that won't stop. Default: `false`.

**Outputs**

- `arguments` (list): The extra command-line arguments it was given
- `commit_hash` (text): The Git commit it ran from, once known
- `created` (text): When it was queued (ISO 8601)
- `debug` (true/false): Whether it ran with debug output
- `diff` (true/false): Whether it showed what would change (Ansible's diff)
- `dry_run` (true/false): Whether it was a dry run (Ansible's check mode)
- `duration_seconds` (number): How long it ran, or has run so far, in seconds
- `ended` (text): When it finished (ISO 8601); empty until it does
- `finished` (true/false): Whether it is over (success, error or stopped)
- `git_branch` (text): The branch the run asked for; empty for the template's
- `id` (number): The task's ID, the number Semaphore UI shows (#123)
- `inventory_id` (number): The inventory the run asked for; 0 for the template's
- `limit` (text): The hosts it was limited to, comma-separated; empty for all
- `link` (text): A link to the task in Semaphore UI
- `message` (text): The message it was started with; empty if none
- `playbook` (text): The file it ran, when the run or its listing says
- `project_id` (number): The ID of the project it's in
- `schedule_id` (number): The schedule that started it; 0 if none did
- `started` (text): When it started (ISO 8601); empty until it does
- `status` (text): waiting, starting, running, stopping, success, error (it failed), stopped, or waiting_confirmation, confirmed or rejected for a Terraform plan awaiting approval
- `stopped` (true/false): Whether this step stopped it; false if it had already finished
- `succeeded` (true/false): Whether it succeeded
- `template_id` (number): The ID of the task template it ran
- `template_name` (text): That template's name
- `user_id` (number): The ID of the user who started it; 0 for a schedule
- `user_name` (text): That user's name, where Semaphore UI gives it
- `variables` (object): The extra variables and survey values it was given

**Example output**

```json
{
  "arguments": [],
  "commit_hash": "9f2c1e7",
  "created": "2026-01-31T09:00:00Z",
  "debug": false,
  "diff": false,
  "dry_run": false,
  "duration_seconds": 42.0,
  "ended": "2026-01-31T09:00:43Z",
  "finished": true,
  "git_branch": "",
  "id": 123,
  "inventory_id": 0,
  "limit": "web1,web2",
  "link": "https://semaphore.example.com/project/1/history?t=123",
  "message": "Release 1.4.2",
  "playbook": "deploy.yml",
  "project_id": 1,
  "schedule_id": 0,
  "started": "2026-01-31T09:00:01Z",
  "status": "stopped",
  "stopped": true,
  "succeeded": false,
  "template_id": 7,
  "template_name": "Deploy web",
  "user_id": 1,
  "user_name": "Ada Admin",
  "variables": {
    "app_version": "1.4.2"
  }
}
```

### Turn schedule on or off

Turn a schedule on or off, as its switch on the Schedule page does: off, it stays but runs nothing, such as during a maintenance window. Doing it twice is harmless.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Schedule (`schedule_id`, text, required): The schedule's ID, as 'List schedules' and 'Create schedule' give it.
- On (`active`, true/false, required): On to turn the schedule on, off to turn it off.

**Outputs**

- `active` (true/false): Whether it is on
- `changed` (true/false): Whether this step changed it; false if it was already so
- `cron` (text): When it runs, in cron's five fields, such as 0 3 * * *
- `id` (number): The schedule's ID
- `name` (text): The schedule's name
- `project_id` (number): The ID of the project it's in
- `template_id` (number): The ID of the task template it runs
- `template_name` (text): That template's name

**Example output**

```json
{
  "active": false,
  "changed": true,
  "cron": "0 3 * * *",
  "id": 9,
  "name": "Nightly deploy",
  "project_id": 1,
  "template_id": 7,
  "template_name": "Deploy web"
}
```

### Update inventory

Change an inventory's name, hosts or keys, such as adding a new server to the list. Fields left blank stay as they are.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Inventory (`inventory_id`, text, required): The inventory: pick one, or paste its ID.
- Name (`name`, text): What to call the inventory, such as Web servers. Leave blank to keep it.
- Hosts (`inventory`, text): The hosts, as an Ansible inventory, one per line, such as web1.example.com; for a file inventory, the file's path in the repository. Leave blank to keep it.
- Key (`key_id`, text): The key Semaphore UI signs in to the hosts with. Every project has one called None for hosts that need none. Leave blank to keep it.
- Sudo key (`become_key_id`, text): The key used to become root on the hosts, if they ask for a password. Leave blank to keep it.
- Repository (`repository_id`, text): For a file inventory, the repository the file is in. Leave blank to keep it.

**Outputs**

- `become_key_id` (number): The ID of the key used to become root; 0 if none
- `id` (number): The inventory's ID
- `inventory` (text): The hosts, or the file's path for a file inventory
- `key_id` (number): The ID of the key used to sign in to the hosts
- `name` (text): The inventory's name
- `project_id` (number): The ID of the project it's in
- `repository_id` (number): The repository a file inventory is in; 0 otherwise
- `type` (text): static (hosts in INI format), static-yaml (hosts in YAML), file (a file in a repository) or terraform-workspace

**Example output**

```json
{
  "become_key_id": 0,
  "id": 3,
  "inventory": "[web]\nweb1.example.com\nweb2.example.com",
  "key_id": 5,
  "name": "Web servers",
  "project_id": 1,
  "repository_id": 0,
  "type": "static"
}
```

### Update repository

Change a repository's name, address, branch or key, such as pointing a project at a release branch. Fields left blank stay as they are.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Repository (`repository_id`, text, required): The repository: pick one, or paste its ID.
- Name (`name`, text): What to call the repository, such as Playbooks. Leave blank to keep it.
- URL or path (`git_url`, text): The Git repository's address, such as git@github.com:acme/playbooks.git, or a folder on the Semaphore UI server, such as /opt/playbooks. Leave blank to keep it.
- Branch (`git_branch`, text): The branch to use, such as main. Leave blank to keep it.
- Key (`key_id`, text): The key Semaphore UI reads the repository with. Every project has one called None for a repository that needs none. Leave blank to keep it.

**Outputs**

- `git_branch` (text): The branch it uses; empty for a folder
- `git_url` (text): Its address, or a folder on the Semaphore UI server
- `id` (number): The repository's ID
- `key_id` (number): The ID of the key used to read it
- `name` (text): The repository's name
- `project_id` (number): The ID of the project it's in

**Example output**

```json
{
  "git_branch": "main",
  "git_url": "git@github.com:acme/playbooks.git",
  "id": 2,
  "key_id": 5,
  "name": "Playbooks",
  "project_id": 1
}
```

### Update schedule

Change a schedule's name, when it runs or the task template it runs. Fields left blank stay as they are.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Schedule (`schedule_id`, text, required): The schedule's ID, as 'List schedules' and 'Create schedule' give it.
- Name (`name`, text): A new name. Leave blank to keep it.
- Cron (`cron`, text): When to run, in cron's five fields (minute, hour, day of month, month, day of week), such as 0 3 * * * for every day at 03:00, in the Semaphore UI server's time zone. Leave blank to keep it.
- Task template (`template_id`, text): Run this template instead. Leave blank to keep it.

**Outputs**

- `active` (true/false): Whether it is on
- `cron` (text): When it runs, in cron's five fields, such as 0 3 * * *
- `id` (number): The schedule's ID
- `name` (text): The schedule's name
- `project_id` (number): The ID of the project it's in
- `template_id` (number): The ID of the task template it runs
- `template_name` (text): That template's name

**Example output**

```json
{
  "active": true,
  "cron": "0 3 * * *",
  "id": 9,
  "name": "Nightly deploy",
  "project_id": 1,
  "template_id": 7,
  "template_name": "Deploy web"
}
```

### Update task template

Change a task template's name, file, repository, inventory, variable group, branch, arguments, survey or what a run may change. Fields left blank stay as they are.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Task template (`template_id`, text, required): The task template: pick one, or paste its ID or a link to its page.
- Name (`name`, text): What to call the template, such as Deploy web. Leave blank to keep it.
- File (`playbook`, text): The playbook or script to run, as its path in the repository, such as deploy.yml; for Terraform or OpenTofu, the folder of the code. Leave blank to keep it.
- Repository (`repository_id`, text): The repository the file is in. Leave blank to keep it.
- Inventory (`inventory_id`, text): The hosts to run on. An Ansible playbook needs one. Leave blank to keep it.
- Variable group (`variable_group_id`, text): The variable group whose values every run gets. Leave blank to keep it.
- Description (`description`, text): What the template is for. Leave blank to keep it.
- Git branch (`git_branch`, text): The branch to run from instead of the repository's own. Leave blank to keep it.
- Arguments (`arguments`, text): Extra command-line arguments every run gets, as you'd type them, such as --forks 10. Leave blank to keep it.
- Survey variables (`survey_variables`, text): The variables a run is asked for, by name, separated by commas, such as app_version, region. Leave blank to keep it.
- Runs can change (`run_can_change`, list): What a single run may change. Semaphore UI ignores these on a run unless they're allowed here. Choose none to leave it as it is. One or more of: `arguments` (Extra command-line arguments), `branch` (The Git branch), `limit` (The hosts it's limited to), `tags` (The tags it runs), `skip_tags` (The tags it skips), `inventory` (The inventory), `debug` (Debug output).

**Outputs**

- `app` (text): What it runs: ansible, terraform, tofu, terragrunt, bash, powershell or python
- `arguments` (list): Extra command-line arguments it always runs with
- `description` (text): Its description; empty if none
- `git_branch` (text): The branch it runs from; empty for the repository's own
- `id` (number): The task template's ID, as the other steps take it
- `inventory_id` (number): The ID of the inventory it runs on; 0 if none
- `last_task_id` (number): The ID of its latest task; 0 if it has never run
- `last_task_status` (text): That task's status; empty if it has never run
- `link` (text): A link to the template in Semaphore UI
- `name` (text): The template's name
- `playbook` (text): The file it runs, as its path in the repository
- `project_id` (number): The ID of the project it's in
- `repository_id` (number): The ID of the repository the file is in
- `run_can_change` (list): What a run may change: arguments, branch, limit, tags, skip_tags, inventory or debug
- `survey_variables` (list): The variables a run is asked for (its survey)
- `task_count` (number): How many tasks it has run
- `variable_group_id` (number): The ID of its variable group; 0 if none

**Example output**

```json
{
  "app": "ansible",
  "arguments": [],
  "description": "Deploys the web app to the web servers",
  "git_branch": "",
  "id": 7,
  "inventory_id": 3,
  "last_task_id": 123,
  "last_task_status": "success",
  "link": "https://semaphore.example.com/project/1/templates/7",
  "name": "Deploy web",
  "playbook": "deploy.yml",
  "project_id": 1,
  "repository_id": 2,
  "run_can_change": [
    "limit",
    "debug"
  ],
  "survey_variables": [
    {
      "description": "The version to deploy",
      "name": "app_version",
      "required": true,
      "title": "Version",
      "type": "string"
    }
  ],
  "task_count": 12,
  "variable_group_id": 4
}
```

### Update variable group

Change a variable group's name, replace its extra variables or environment variables, or add and replace secret variables, such as rolling a version number or a password.

**Inputs**

- Project (`project_id`, text, required): The project: pick one, or paste its ID or a link to any of its pages in Semaphore UI.
- Variable group (`variable_group_id`, text, required): The variable group: pick one, or paste its ID.
- Name (`name`, text): What to call the variable group, such as Production. Leave blank to keep it.
- Extra variables (`variables`, object): Variables every run gets, by name, such as {"app_version": "1.4.2"}. Replaces the ones it has. Leave blank to keep them.
- Environment variables (`environment_variables`, object): Environment variables every run gets, such as {"TZ": "UTC"}. Replaces the ones it has. Leave blank to keep them.
- Secret variables (`secret_variables`, object): Variables kept secret, by name: Semaphore UI stores them encrypted and never shows them again. Adds these, or replaces ones of the same name.

**Outputs**

- `environment_variables` (object): Its environment variables, by name
- `id` (number): The variable group's ID
- `name` (text): The variable group's name
- `project_id` (number): The ID of the project it's in
- `secret_names` (list): The names of its secret values; Semaphore UI never gives the values
- `variables` (object): Its extra variables, by name

**Example output**

```json
{
  "environment_variables": {
    "ANSIBLE_FORCE_COLOR": "1"
  },
  "id": 4,
  "name": "Production",
  "project_id": 1,
  "secret_names": [
    "db_password"
  ],
  "variables": {
    "app_env": "production"
  }
}
```
