Leveraging cloud-init's "vendor-data" feature


as discussed here, I believe it would make sense to be able to leverage the “vendor-data” par of cloud-init.

Our use-case is the following:

  • we are renting machines to labs within our institution
  • part of this process is to provide support on the machines to the labs
  • as a consequence, we need to be able to run specific Ansible playbooks when the labs are re-staging the servers (self-service process)
  • finally, our customers are already using “user-data” scripts to customize their instances. Therefore, we cannot “override” their script (and it not the way cloud-init is supposed to work).

Further to this case, we can definitely see such a feature to set package mirrors or any machine specific configuration.

Since cloud-init natively supports Ansible playbooks and MaaS is already leveraging the “user-data” part of cloud-init, I believe it would make a lot of sense to be able to manage “vendor-data” scripts though MaaS.

Typically, I could imagine having a library of cloud-init “vendor-data” scripts that could be attached to any machine (pretty much like DHCP snippets).

Alternatively, it could be nice to tie the cloud-init vendor-data scripts with tags. Everytime a machine having a given tag is deployed, a specific vendor-data script would be run.

Thanks in advance for your consideration and your feedback.