Configure multiple servers at once

Hi, I’m using MaaS UI to configure storage on several machines but I don’t want to configure one by one.

Is there a way, using the UI or something else, to automate the storage configuration of my machines?


Same issue … CLI is your way to go for that but documentation is a bit light sometimes, you’ll have to play with it.

I really lack a missing “server template” feature, would be really helpful when you add may machines at once.

Hi @memogarcia-jp, welcome to the MAAS community! Thanks for your question -
if you have broadly homogenous hardware, you can set up storage and/or networking on one machine as you want it and use that as a template for others.

This is implemented in the API as a clone operation, as mentioned Copy machine configuration but for now doesn’t exist in the UI. We do have plans in the future to add a more featureful templating system but not on the deck just yet.

1 Like

Thank you very much, I will take a look at the clone API and check if there are integrations already with Ansible or Terraform.

Thanks again.!

Does it work with CLI ?

API documentation is complete but it would be really great to have a few usage examples or playground.

The maas cli include the clone option. The command itself is quite explanatory:

maas $PROFILE machines clone source=$ID_SOURCE destinations=$ID_DESTINATION interfaces=True storage=True

You can get the machine id with:
maas $PROFILE machines read | jq '.[] | .hostname +"-"+ .system_id'

1 Like