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

fix dynamic include search path. Fixes #34782 #34783

Closed
wants to merge 2 commits into from

Conversation

torgiren
Copy link

SUMMARY

Fix search paths for include_tasks, when include_role is used

Fixes #34782
It Adds original role tasks folder to search path when using include_tasks.
Adds base (first role which call include_role) tasks as well.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

dynamic_include strategy (I think)

ANSIBLE VERSION
ansible 2.5.0 (fix_dynamic_include_path e6b2a416bb) last updated 2018/01/12 08:32:10 (GMT +200)
  config file = None
  configured module search path = [u'/home/torgiren/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /tmp/ansible/lib/ansible
  executable location = /tmp/ansible/bin/ansible
  python version = 2.7.14 (default, Nov 26 2017, 14:35:36) [GCC 5.4.0]

2.4.0 as well

ADDITIONAL INFORMATION

full information is in issue

@ansibot ansibot added affects_2.5 This issue/PR affects Ansible v2.5 bugfix_pull_request needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Jan 12, 2018
@mkrizek
Copy link
Contributor

mkrizek commented Jan 12, 2018

cc @bcoca @jimi-c

@mkrizek mkrizek removed the needs_triage Needs a first human triage before being processed. label Jan 12, 2018
@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Jan 12, 2018
@mattclay
Copy link
Member

CI failure in unit tests:

>                                   cumulative_path = os.path.join(parent_include._role._role_path, "tasks")
E                                   AttributeError: 'NoneType' object has no attribute '_role_path'

lib/ansible/playbook/included_file.py:121: AttributeError

@mattclay mattclay added the ci_verified Changes made in this PR are causing tests to fail. label Jan 17, 2018
@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Jan 21, 2018
@jimi-c
Copy link
Member

jimi-c commented Jan 31, 2018

Hi @torgiren, could you rebase this, as I've merged #35165 (which touched several of the same lines). There is also another from @pilou- that may require a rebase if it's merged before this as well.

@jimi-c
Copy link
Member

jimi-c commented Jan 31, 2018

Or, if the above PR fixes your original issue as well, please go ahead and close this PR.

@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html new_contributor This PR is the first contribution by a new community member. labels Jan 31, 2018
@torgiren
Copy link
Author

@jimi-c: looks like it's already fixed
I will try it on our production when new version of ansible will be on pypi ;)
thanks

@torgiren torgiren closed this Jan 31, 2018
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bugfix_pull_request labels Mar 6, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.5 This issue/PR affects Ansible v2.5 bug This issue/PR relates to a bug. needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. new_contributor This PR is the first contribution by a new community member. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong search paths with include_role
5 participants