How to Run different provisioning scripts during deploy (tags?)

Is there a way to, maybe by tag, run different provisioning scripts?

Say I am deploying bionic.

If I have a ‘desktop-mate’ tag, maybe it will do
sudo add-apt-repository universe && sudo apt install ubuntu-mate-desktop^

If I have a ‘upgrade’ command it will
sudo apt-get upgrade -y

Et cetera.



perhaps the tags could be made available as env vars to the provisioning scripts?

Use case that you’re describing is better suited to third party software (could be a simple ansible type script) using the MAAS API to discover tags on machines and then invoking commands via SSH