Hi, we’re looking for a way to custom Curtin scripts (Example : curtin_userdata_xxx) with parameters that have been chosen in the interface (Example : zone, resource pool and tag).
For example : If zone = Europe, Curtin scripts configure the good timezone.
Is there a way to do this?
Thank you very much.
1 Like
Yeah, I would welcome such thing also. I would like to use if statement in curtin_userdata
file, but there is no info if it’s possible or not.
@en55554 have you manage this somehow?
No I’m still looking for the solution, I also tried with if but I didn’t succeed.
Hello @en55554 @tomino-i,
I am afraid is not possible to access any MAAS information such tags, zones… using curtin scripts.
If you really need this information, a workaround could be using curtin in the following way:
- install MAAS in the new machine,
- log in to the MAAS instance from where you want to retrieve the information (you need to provide its credentials),
- retrieve the data of interest using the CLI,
- run the configuration of the machine,
- clean up credentials,
- uninstall MAAS.
However, that might introduce too much complexity and could potentially leak the credentials if not done correctly.
The post is tagged as “Features”, thus, the team might consider this request for future development depending on the MAAS’ roadmap and the interest of the community.