Tags are awfully convenient, especially as your infrastructure begins to sprawl.
Basically,
these are like tags in Microsoft Azure or AWS. They're
key value pairs that are, in this case,
notice that they're specific to tasks within this play
called Manage Windows Features with Tags.
And so you've got this, it's just an arbitrary tags list.
So this would be something else for you and your
team to decide a naming convention.
But what's cool about this, notice that this first install task has
Install and IIS as tags. And the second task that ensures the IIS
service is running has Service and IIS. What comes into play here with
the tags is when you run your playbook, if you look up at the top of the slide,
the third comment,
you use the ansible‑playbook CLI command to execute a playbook.
But notice that by specifying the Tags parameter,
you can target only hosts that are attached to
these tasks that fit that criteria.
So in this case, in this example, the task Install IIS would fire,
but the second one would not.