I am on the most recent version of the devel branch, and I have a role
dependency in the meta of that role, and when I set it I have a when
statement. Now it skips everything when it runs except a task with_items,
and it fails b/c the object is defined, which makes sense because
everything else was skipped so the with_items was not defined in the
previous steps. I tried to put a when statement on that with_items step
but it doesn't seem to prevent it from running and it gives me a failure.
---
dependencies:
- {role: kubernetes-install}
- {role: kubernetes-add-ons, tag: kubernetes, when: env=="vagrant" }
- {role: kubernetes-post-install, tag: kubernetes, when: env=="vagrant" }
So the 2 and 3rd steps would only be run when the environment is vagrant;
and most is skipped except the task that has a with_items task
- name: Test
template: src={{base}}/{{name}}/templates/{{item}}
dest={{base}}/{{name}}/.tmp/
with_items: "{{sorted_configs.stdout_lines}}"
register: specs
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.