+++ title = "knife tag" draft = false
gh_repo = "chef-workstation"
aliases = ["/knife_tag.html", "/knife_tag/"]
[menu] [menu.workstation] title = "knife tag" identifier = "chef_workstation/chef_workstation_tools/knife/knife_tag.md knife tag" parent = "chef_workstation/chef_workstation_tools/knife" +++
{{< readfile file="content/reusable/md/chef_tags.md" >}}
{{< readfile file="content/workstation/reusable/md/knife_tag_summary.md" >}}
{{< note >}}
{{< readfile file="content/workstation/reusable/md/knife_common_see_common_options_link.md" >}}
{{< /note >}}
Use the create
argument to add one or more tags to a node.
This argument has the following syntax:
knife tag create NODE_NAME [TAG...]
This command does not have any specific options.
The following examples show how to use this knife subcommand:
Create tags
To create tags named seattle
, portland
, and vancouver
, enter:
knife tag create node seattle portland vancouver
Use the delete
argument to delete one or more tags from a node.
This argument has the following syntax:
knife tag delete NODE_NAME [TAG...]
This command does not have any specific options.
The following examples show how to use this knife subcommand:
Delete tags
To delete tags named denver
and phoenix
, enter:
knife tag delete node denver phoenix
Type Y
to confirm a deletion.
Use the list
argument to list the tags that have been applied
to a node.
This argument has the following syntax:
knife tag list [NODE_NAME...]
This command does not have any specific options.
The following examples show how to use this knife subcommand:
View a list of tags
To view the tags for a node named devops_prod1
, enter:
knife tag list devops_prod1