This article will help you learn:
How to create and assign machine tags to machines
If you want to create a new tag, and simultaneously assign it to a machine, use the following steps:
Create and/or assign the desired tag, as described in the general tagging procedure above.
Don’t forget to hit the “Tag machine” button when you’re done, to apply your changes to the machine.
How to tag multiple machines at once
In the first step of the above procedure, you can select more than one machine:
Any tags you add in the “Tags” box will be applied to all selected machines, as noted by the change in the “Tag machine” button:
Other than the scope of the transaction (e.g., tagging three machines, in this case), everything else about this operation conforms to the general tag assignment procedure.
How to remove and delete machine tags from machines
To remove machine tags from a machine:
View a machine’s currently assigned tags: stay on the ‘Machines’ page and click on the machine in question. MAAS will display currently-assigned tags in the Tags pane of the ‘Machine summary’.
Select the ‘Configuration’ tab and then the ‘Edit’ button alongside ‘Machine configuration’ to edit tags:
Follow the general tag removal procedure.
How to list machine tags for multiple machines
In the MAAS UI, you don’t explicitly list all machine tags; instead, you filter by them using the “Filter by” drop-down. This filtered list does not distinguish between virtual machines (VMs) and physical machines, unless you’ve assigned tags to help with that distinction.
Here’s how you can filter the machine list by machine tags, using the MAAS UI:
To list all tags, visit the ‘Machines’ tab and expand the ‘Tags’ subsection in the left pane. In this view, you can use tags as machine search filters.
Select one or several tags. The machines that satisfy all selected tags will display on the right pane. Notice there is a search field at the top of the right pane. You can type a search expression into this field.
Below, tag ‘virtual’ has been selected (with the mouse), and the search field automatically reflects this. Five machines satisfy this search filter.
Remove a tag from the search filter by either hitting the ‘x’ character alongside a tag or editing the search expression.
How to view machine tags for one machine
To view the tags assigned to a specific machine, use the following procedure:
On the machine list, select the machine of interest by clicking on its name.
On the machine detail screen that comes up, look for the tags on one of the cards presented there: the tags for that machine should be listed there.
How to view machine tags for a VM host
To view the machine tags assigned to a VM host, here’s the procedure you’ll follow:
Note that you can only see the tags for a VM host in the same place that you change it. For a more comprehensive list of VM host tags, use the MAAS CLI.