On Mon, May 19, 2014 at 4:29 PM, James Cammarata <[email protected]> wrote: > Ahh, if you're not wanting to completely bail out of the play entirely then > you have a few options: > > 1) start using tags to label your tasks and use the --tags or --skip-tags > options to control which parts are run/skipped.
This doesn't work since the rest of the play is conditional on something that is dynamically discovered on the machine (let's say a battery-backed cache or something like that). We don't know if something is going to be skipped until the play has reached this point. > 2) move those tasks into a new file and use "include" with "when" to control > when those tasks are run. That has some promise. I'll report back after playing around. > 3) split your playbook into roles (which can also use tags and when to > conditionally control execution). Not something that is known ahead of time and can change. The play being executed is already in a role. Can a role conditionally include another role while it's executing? Also seems clumsy to have a logical role split into 2 separate roles. Makes having the logical 2nd half share the vars/handlers/etc of the 1st half trickier. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJQqANds5QXEWsUrcCLv_N%3DwyLKanyY8321A_YVScichVfRJ8A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
