Image-builder, cloud-init and Foreman/Ketello

I have been tinkering around with image builder. The question I have is how to inject files in to the image. I know you can create files but It looks like the file is a one. See below example
Cloud-init files are in yml format. I am trying to accomplish something like this With foreman, cloud-init and rockey linux. But in place of vmware I am planning to use proxmox. Unless there is a way to inject multiple lines of code for the files using image builder I looked at osbuild user guide but dident find a solution.

[[customizations.files]]
path = “/etc/foobar”
mode = “0644”
user = “root”
group = “root”
data = “Hello world!”

It turns out with toml I can use multi-line literal strings with three single quotes at the start and end. See example below.

[[customizations.files]]
path = “/etc/cloud/cloud.cfg.d/10_foreman.cfg”
mode = “0644”
user = “root”
group = “root”
data = ‘’’
datasource_list: [NoCloud]
datasource:
NoCloud:
seedfrom: http://sat01.example.com/userdata/
‘’’

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.