Build a file from a template on the Rudder server.

⚙️ Compatible targets: Linux


source_templateSource file containing a template to be expanded (absolute path on the server).

This parameter is required.
destinationDestination file (absolute path on the target node).

This parameter is required.
template_typeTemplate type (jinja2 or mustache).

  • jinja2
  • mustache

This parameter is required.


method: file_from_remote_template
  destination: VALUE
  source_template: VALUE
  template_type: jinja2


Write a file based on a template on the Rudder server and data available on the node


To use this method, you need to have:

  • a template on the Rudder server shared folder
  • data to fill this template

The template needs to be located in the shared-files folder and can be accessed with:


The data that will be used while expanding the template is the data available in the agent at the time of expansion. That means:

  • Agent's system variables (${sys.*}, ...) and conditions (linux, ...)
  • data defined during execution (result conditions of generic methods, ...)
  • conditions based on condition_ generic methods
  • data defined using variable_* generic methods, which allow for example to load data from local json or yaml files.

Template types

Supported templating languages:


This method will provide extra log_warning message if the template was not updated, but the destination file is modified.