How to tag machines using cli from either create or deploy?

Is there a way to tag a machine when you do a create or deploy of a machine granted that the tag already exist. This command might have been from a previous version of MAAS.

maas machines create tags=


Hi @johnliaotvc,

I apologize but I’m not sure I’ve got what you mean. Could you better describe what you are trying to achieve?

We want to do something like this with the cli but add a tag option in here.

maas admin machines create -d  architecture=amd64 hostname=<hostname> mac_addresses=<mac> domain=<domain> power_type=ipmi power_parameters_power_driver=LAN_2_0 power_parameters_power_boot_type=auto power_parameters_power_user=<user>  power_parameters_power_address=<ipaddress> power_parameters_power_pass=<password>

The solution seems to be create the machines first and then apply the tags to the machines system_id. What is the best practice here?


afaik it’s not currently possible to specify a manual tag during the creation of a machine. The only way to specify a manual tag is to update the machine after the creation as you pointed out.

Maybe the automatic tagging feature might fit your use case. You can read more here

Hi @johnliaotvc,

Is your use case handled with the automatic tagging feature?

If not, I have created internal product feedback to track this request under the ID of PF-4005.

I look forward to your feedback.

It would be great if we can get the tag feature to work while creating the machine. The auto tag is not ideal and requires work to figure out what correct asset to tag the machine against from the installation log.