Config Template Rendering
If tmpl and jinja2 are installed, config will be rendered before it is loaded.
pip install tmpl jinja2
Example
ctl:
plugins:
- type: git
name: git_ctl
config:
repo_url: git@github.com:20c/ctl
- type: command
name: printenv
config:
shell: true
command:
- "echo \"ctx.home: {{ ctx.home }}\""
- "echo \"ctx.tmpdir: {{ ctx.tmpdir }}\""
- "echo \"ctx.cachedir: {{ ctx.cachedir }}\""
- "echo \"{{ input.plugin }}\""
permissions:
- namespace: ctl
permission: crud
Exposed variables
variable | description |
---|---|
ctx.home | path to ctl home directoy |
ctx.tmpdir | path to ctl tmp directory |
ctx.cachedir | path to ctl cache directory |
ctx.user_home | path to user home directory |
input.plugin | input parameters for the plugin that's being executed |
plugin.[plugin_name] | variables exposed by a plugins expose_vars function |