Need help with foreman_omaha transpiler

Not 100% sure how I should be using transpile_container_linux_config. Would you use in to ingest a yaml snippet to return the json output?
Expected outcome:
Not sure
Foreman and Proxy versions:
Foreman and Proxy plugin versions:
foreman_omaha 1.0 (with updates from git master), smart_proxy_omaha .0.3 (with updates from git master)
Other relevant data:

@TimoGoebel - can you assist?

Hi @mleklund,

you can use it in templates like this:

<%- ignition = snippet('CoreOS provision Ignition Base') -%>
<%= transpile_container_linux_config(ignition) %>

So basically, create a snippet that contains your YAML definition. The snippet is rendered and passed to ct. ct transpiles the YAML to JSON. The transpiled JSON is then available in the template.

I hope, this helps.


I figured I should use a snippet, or snippets to build the YAML, then hand it off to the transpiler, just wanted to make sure I was not missing something obvious.

BTW @TimoGoebel, your work on this is fantastic. I had a bit of trouble getting it installed since I am using Ubuntu packages, but the code works great. Thank you!


I’m getting this error here

There was an error rendering the Flatcar Ignition Transpile template: undefined method transpile_container_linux_config for #<Foreman::Renderer::Scope::Provisioning:0x00005624a1a63350>
<%- ignition = snippet('Flatcar provision') -%>
<%= transpile_container_linux_config(ignition) %>

which is a bit weird since I can see “transpile_container_linux_config” listed under global macros