Skip to content

[FEATURE] - ADD PRE-RENDER COMMAND #114

@patrick-hermann-sva

Description

@patrick-hermann-sva

STORY:

  • we want to use var refs out of a dict but we do not no inside the template which dict keys will be used. so we should have a prerender command to render the template before actualy render it :-)
machineshop render \
--source local \
--template ../golang/machineshop/tests/template-square.yaml \
--brackets square \
--output stdout \
--prerender true \
--prerenderbrackets curly  \
--prerendervars "this=[[ .vmConfig_l_cpu ]], andThis= [[ .vmConfig_l_ram]]"  \
--defaults /home/sthings/projects/stuttgart-things/packer/environments/labul-pve.yaml

TEST

cpu: {{ .this }}
ram: {{ .andThis }}
machineshop render --template /tmp/tpl.yaml --source local --values "this={{ .vmConfig_l_cpu }},andThis={{ .vmConfig_l_ram }}"```

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions