include a playbook, but only run certain tags out of the playbook

Is there a syntax for this? Do I have to pass --tags to the top level playbook that I want to run out of the included playbook?

-jlk

Yes, you have to pass --tags.

I’ve occasionally wanted to do what Jesse suggested, both for includes and roles, and have considered suggesting it to the list.

My first thought was that this would be an elegant way of reusing roles, playbooks and task files.

My second thought was that that could result in a less elegant or clear ‘model of our systems’: that splitting up the roles/playbooks/tasks (and creating other playbooks to reassemble them) would expose key fragments of our configuration/orchestration that would be otherwise obscured.

Thoughts?

K

Kahlil, if you haven’t seem them already, about 2 weeks ago I added role dependencies, which allow you to add roles via a meta/main.yml file.

See here for more details:

http://www.ansibleworks.com/docs/playbooks.html#role-dependencies

This will be available in 1.3 (or now, if you’re using the devel branch straight from github).

Ah very cool. Thanks for the heads up! :slight_smile: