Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use include_tasks rather than import_tasks #6

Open
alanbchristie opened this issue Nov 2, 2020 · 0 comments
Open

Use include_tasks rather than import_tasks #6

alanbchristie opened this issue Nov 2, 2020 · 0 comments

Comments

@alanbchristie
Copy link
Contributor

Evaluation of include_tasks occurs when the tasks are encountered whereas import_tasks is evaluated statically, and prior to evaluating any variables. Consequently, if you're dependent of variables during the import then it may fail, i.e. doing something like this will fail: -

- import_tasks: finalise-{{ data_source_out }}.yaml

As a general policy ... use include_tasks unless there's an important reason why import_tasks is being used. And, if using import_tasks add a comment as to why include_tasks is not being used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant