include: myplaybook.yml tags=mytag, how to make it work ?

Hello,

Including a playbook with a tag restriction doesn’t actually restrict the playbook to the tags. It play’s the whole playbook.

am I missing something ?

Thanks

Alain

There are no tag restrictions this way, what you have done, which is consistent with how this is documented, is tagged the tasks with those plays.

Okay, I did miss the semantic here. I’d thought it was include “only” the task associated with the tags given. Which incidentally was exactly what I was looking for.
The only was to do that ( restrict by tag ) is only on the command line with -t option right ?

Thanks

“The only was to do that ( restrict by tag ) is only on the command line with -t option right ?”

yep!