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

Properly parse task includes #9

Open
croesnick opened this issue Mar 11, 2018 · 1 comment
Open

Properly parse task includes #9

croesnick opened this issue Mar 11, 2018 · 1 comment
Labels
bug Something isn't working enhancement Enhancements on existing features

Comments

@croesnick
Copy link
Owner

Scenario

p0.yml:

- hosts: all
  tasks:
    - include_tasks: t0.yml

t0.yml:

- import_tasks: t1.yml
- include_role:
    name: r0

Actual Behaviour

The top-level task include in p0.yml is not parsed, and so isn't the role include in t0.yml.

Expected Behavior

We should get the dependency chain

p0.yml ---> t0.yml ----> t1.yml
                   \
                    +--> roles/r0
@croesnick croesnick added bug Something isn't working enhancement Enhancements on existing features labels Mar 11, 2018
@croesnick
Copy link
Owner Author

Also take care of handling includes in blocks. Example (taken from stackoverflow):

- name: test
  hosts: all
  tasks:
    - block:
      - include: include1.yml
      - include: include2.yml
    when: doinclude  | default('true')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement Enhancements on existing features
Projects
None yet
Development

No branches or pull requests

1 participant