For AI agents: the complete documentation index is available at https://www.jumpserver.com/docs/llms.txt, the full documentation bundle is available at https://www.jumpserver.com/docs/llms-full.txt, and this page is available as Markdown at https://www.jumpserver.com/docs/features/workbench/job-center/templates.md.
๐ŸŽ‰ JumpServer v5.1.1 is available. See what's new โ†’

Templates

Templates keeps the scripts and Playbooks that Adhoc commands and jobs reuse. Write the content once and reference it from many jobs: when the template changes, the jobs that use it pick up the new version, so the same command does not have to be maintained in several places. This is the recommended way to standardize routine checks and configuration scripts.

Figure 1: The Templates page

The page has two tabs: Script for command templates and Playbook for Playbook templates.

Prerequisites

  • The Job Center feature is enabled in Feature Settings.
  • Your role grants the permissions for the template type you want to manage.

Create a script template

1

Open the Script tab and click Create.

2

Enter a name and choose the scope. A public template is available to everyone; a private template is visible only to its creator.

3

Choose the module, for example Shell, and write the script in the content editor.

4

Add any variables the script uses, with a default value for each.

5

Optionally add a comment, then click Submit. Use Save and continue to create several templates in a row.

Figure 2: Creating a script template

Create a Playbook template

1

Open the Playbook tab and click Create.

2

Enter a name, choose the scope, and upload a ZIP archive of the Playbook.

3

Make sure the archive contains a main.yml entry file at its root. Directories such as roles/, vars/, and optional files such as set_env.yml are allowed next to it.

After upload, the Playbook can be selected when creating a Playbook job in Jobs.

Template parameters

ParameterApplies toDescription
NameScript, PlaybookTemplate name
ScopeScript, PlaybookPublic (everyone) or private (creator only)
ModuleScriptScript module, such as Shell
ContentScriptScript body
VariablesScriptVariables and their default values
FilePlaybookZIP archive with main.yml at the root
CommentScript, PlaybookOptional description

Column reference

ColumnDescription
NameTemplate name
ModuleScript module; Playbook templates show no module
ContentScript body preview
CommentOptional note
ScopePublic or private visibility
Created byAccount that created the template
Date createdCreation time
ActionsEdit, clone, or delete the template
Tip

Script templates can be loaded from Open command on the Adhoc page and from the Template field of a script job. Variables are requested each time the command runs.

Warning

Editing a public template affects every job and Adhoc command that references it. Check existing usage before changing a shared template, and prefer cloning it into a private template when you need a variant.