Skip to content

What's the correct way to write a file using the cloud-config before installation? #3342

Discussion options

You must be logged in to vote

Thanks for the tips. It turns that, when I deleted the - name key in my cloud-config, I had files instead of - files, so the files key was being treated as a mapping, instead of a list of mappings.

This worked:

fs:
    - name: Test
      files:
      - path: /etc/test
        content: |
          test

This (unsurprisingly) didn't work:

fs:
    files:
    - path: /etc/test
      content: |
        test

kairos-agent validate didn't seem to catch that deviation from the YAML schema for some reason. Do you know why?

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@AlexanderTheGrey
Comment options

Answer selected by AlexanderTheGrey
@jimmykarily
Comment options

@jimmykarily
Comment options

@AlexanderTheGrey
Comment options

@jimmykarily
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants