template
The template
module allows you to create a file using a jinja template.
Arguments
src
: a string that contains the path to the template file on the local machine.dst
: a string that contains the path to the destination file on the target server.vars
: a table that contains the variables to be used in the template.
Usage Example
local task = {
name = "Create a file using a template",
komandan.modules.template({
src = "/path/to/template.jinja",
dst = "/tmp/target_file.txt",
vars = {
name = "John Doe",
age = 30,
},
}),
}