Help with curtin and user-data

How to validate if my user data is working? I have used the scenario mentioned below to pass user data in MAAS

Hi there,

The way we recommend customizing your deployments is via cloud-init or via curtin preseeds as you have done in your example (You can find more information in Customizing MAAS deployments with cloud-init ).

However, a more elegant way of doing so is via cloud-init user-data
( see https://cloudinit.readthedocs.io/en/latest/topics/examples.html?highlight=users#including-users-and-groups )

You can pass user-data every time you deploy a machine via the API, or you can tell curtin to write cloud-init user-data on the installed system so it is executed on first boot. e.g in /etc/maas/curtin_userdata, you could add something like:

write_files:
  setup_user:
    path: /etc/cloud/cloud.cfg.d/99_setup_user.cfg
    content: |
      #cloud-config
      <your-user-data>

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