# Templating

To facilitate the maintainability of your pipeline, Azure Pipelines offers the possibility to create template to mutualize common tasks.

Create a file print-variable.yml with this content:

parameters:
- name: VARIABLE
  type: string
  default: “Hello World”

steps:
- script: echo ${{ parameters.VARIABLE }}

Next, you can use it to replace the task that print the variable my-password.

- template: print-variable.yml
  parameters:
    VARIABLE: $(my-password)

TIP

Templates can be used to mutualize steps, jobs and stages.

Git branch

template-print-variable