Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] - ADD PRE-RENDER COMMAND #114

Open
patrick-hermann-sva opened this issue Aug 19, 2024 · 0 comments
Open

[FEATURE] - ADD PRE-RENDER COMMAND #114

patrick-hermann-sva opened this issue Aug 19, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@patrick-hermann-sva
Copy link
Contributor

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 }}"```
@patrick-hermann-sva patrick-hermann-sva added the enhancement New feature or request label Aug 19, 2024
@patrick-hermann-sva patrick-hermann-sva self-assigned this Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant