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

BZ #1849656 - Fix you cannot use loops on 'import_tasks' statements #20

Merged
merged 1 commit into from Jun 22, 2020

Conversation

adamruzicka
Copy link
Collaborator

Turns out import_tasks imports the tasks before the actual run is
started so it cannot import tasks dynamically based on something
generated during the play. include_tasks is the right variant for
this.

The catch with include_tasks is that environment cannot be set on this
task, for this reason the contents of register_with_sources had to be
wrapped in a block to apply the environment to all tasks in it.

Turns out import_tasks imports the tasks before the actual run is
started so it cannot import tasks dynamically based on something
generated during the play. include_tasks is the right variant for
this.

The catch with include_tasks is that environment cannot be set on this
task, for this reason the contents of register_with_sources had to be
wrapped in a block to apply the environment to all tasks in it.
Copy link
Collaborator

@ares ares left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @adamruzicka, merging!

@ares ares merged commit 489a1b5 into project-receptor:master Jun 22, 2020
@adamruzicka adamruzicka deleted the include branch June 30, 2020 07:57
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

Successfully merging this pull request may close these issues.

None yet

2 participants