Template
link_template_to_host
Link templates to hosts.
Examples
Link one template to one host
Link many templates to many hosts
Link one template to all hosts
Link many templates to all hosts
Link all templates to all hosts (use with caution!)
Arguments
TEMPLATE_NAMES_OR_IDS
Template names or IDs. Comma-separated. Supports wildcards.
Type: text 
Required: ✅
HOSTNAMES_OR_IDS
Hostnames or IDs. Comma-separated. Supports wildcards.
Type: text 
Required: ✅
Options
--strict
Fail if any hosts or templates aren't found. Should not be used in conjunction with wildcards.
Type: boolean 
Default: False
--dryrun
Preview changes.
Type: boolean 
Default: False
link_template_to_template
Link templates to templates.
NOTE: Destination templates are the ones that are ultimately modified. Source templates remain unchanged.
Examples
Link one template to one template
Link many templates to many templates
Link all templates starting with 'Apache' to a template
Link all templates containing 'HTTP' to a subset of templates
Arguments
SOURCE
Template names or IDs. Comma-separated. Supports wildcards.
Type: text 
Required: ✅
DEST
Template names or IDs. Comma-separated. Supports wildcards.
Type: text 
Required: ✅
Options
--strict
Fail if any templates aren't found. Should not be used in conjunction with wildcards.
Type: boolean 
Default: False
--dryrun
Do not actually link templates, just show what would be done.
Type: boolean 
Default: False
show_items
Show a template's items.
Examples
Show items for a template
Arguments
TEMPLATE_NAME
Template name or ID. Supports wildcards.
Type: text 
Required: ✅
show_template
Show a template.
Arguments
TEMPLATE_NAME
Template name or ID. Names support wildcards.
Type: text 
Required: ✅
show_templates
Show all templates.
Shows all templates by default. The template name can be a pattern containing wildcards. Names and IDs cannot be mixed.
Arguments
TEMPLATES
Template name(s) or ID(s). Comma-separated. Supports wildcards.
Type: text 
unlink_template_from_host
Unlink templates from hosts.
Unlinks and clears by default. Use --no-clear to unlink without clearing.
Examples
Unlink a template from a host
Unlink many templates from many hosts
Unlink one template from all hosts
Unlink templates starting with 'Apache' from hosts starting with 'Web'
Unlink template from host without clearing items and triggers
Arguments
TEMPLATE_NAMES_OR_IDS
Template names or IDs. Comma-separated. Supports wildcards.
Type: text 
Required: ✅
HOSTNAMES_OR_IDS
Hostnames or IDs. Comma-separated. Supports wildcards.
Type: text 
Required: ✅
Options
--strict
Fail if any hosts or templates aren't found. Should not be used in conjunction with wildcards.
Type: boolean 
Default: False
--dryrun
Preview changes.
Type: boolean 
Default: False
--clear/--no-clear
Unlink and clear templates.
Type: boolean 
Default: True
unlink_template_from_template
Unlink templates from templates.
Unlinks and clears by default. Use --no-clear to unlink without clearing.
NOTE: Destination templates are the ones that are ultimately modified. Source templates remain unchanged.
Examples
Unlink one template from one template
Unlink many templates from many templates
Unlink all templates starting with 'Apache' from a template
Unlink all templates containing 'HTTP' from a subset of templates
Unlink a template without clearing items and triggers
Arguments
SOURCE
Template names or IDs. Comma-separated. Supports wildcards.
Type: text 
Required: ✅
DEST
Template names or IDs. Comma-separated. Supports wildcards.
Type: text 
Required: ✅
Options
--strict
Fail if any templates aren't found. Should not be used in conjunction with wildcards.
Type: boolean 
Default: False
--clear/--no-clear
Unlink and clear templates.
Type: boolean 
Default: True
--dryrun
Preview changes.
Type: boolean 
Default: False