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

WIP Fixing relative dwim searching when the src path contains .. #28603

Open
wants to merge 2 commits into
base: devel
Choose a base branch
from

Conversation

jimi-c
Copy link
Member

@jimi-c jimi-c commented Aug 24, 2017

SUMMARY

Also generalizing some of the task file path code into Base for all
playbook objects, and adding parent source paths to the search paths
to aid in relative path discovery when doing includes and/or roles.

Fixes #14341

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

core engine

ANSIBLE VERSION
ansible 2.4.0 (issue_14341_relative_path_dwim_fixes e12ca80953) last updated 2017/08/24 10:20:43 (GMT -500)
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/usr/share/ansible']
  ansible python module location = /data/devel/ansible/lib/ansible
  executable location = /data/devel/ansible/bin/ansible
  python version = 2.7.13 (default, Jun 26 2017, 10:20:05) [GCC 7.1.1 20170622 (Red Hat 7.1.1-3)]

ADDITIONAL INFORMATION

Also generalizing some of the task file path code into Base for all
playbook objects, and adding parent source paths to the search paths
to aid in relative path discovery when doing includes and/or roles.

Fixes ansible#14341
@ansibot ansibot added WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers. affects_2.4 This issue/PR affects Ansible v2.4 bugfix_pull_request c:playbook/base c:playbook/helpers c:playbook/included_file c:playbook/task 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 Aug 24, 2017
@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label Aug 24, 2017
@ansibot
Copy link
Contributor

ansibot commented Aug 24, 2017

The test ansible-test sanity --test pep8 failed with the following errors:

lib/ansible/parsing/dataloader.py:384:17: E265 block comment should start with '# '
lib/ansible/playbook/helpers.py:180:89: E226 missing whitespace around arithmetic operator
lib/ansible/playbook/helpers.py:182:98: E226 missing whitespace around arithmetic operator
lib/ansible/playbook/helpers.py:203:96: E226 missing whitespace around arithmetic operator
lib/ansible/playbook/included_file.py:116:97: E226 missing whitespace around arithmetic operator
lib/ansible/playbook/included_file.py:118:106: E226 missing whitespace around arithmetic operator
lib/ansible/playbook/included_file.py:118:161: E501 line too long (171 > 160 characters)
lib/ansible/playbook/included_file.py:128:108: E226 missing whitespace around arithmetic operator
lib/ansible/playbook/included_file.py:128:161: E501 line too long (165 > 160 characters)

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Aug 25, 2017

The test ansible-test sanity --test pep8 failed with the following errors:

lib/ansible/playbook/helpers.py:180:89: E226 missing whitespace around arithmetic operator
lib/ansible/playbook/helpers.py:182:98: E226 missing whitespace around arithmetic operator
lib/ansible/playbook/helpers.py:203:96: E226 missing whitespace around arithmetic operator
lib/ansible/playbook/included_file.py:116:97: E226 missing whitespace around arithmetic operator
lib/ansible/playbook/included_file.py:118:106: E226 missing whitespace around arithmetic operator
lib/ansible/playbook/included_file.py:118:161: E501 line too long (171 > 160 characters)
lib/ansible/playbook/included_file.py:128:108: E226 missing whitespace around arithmetic operator
lib/ansible/playbook/included_file.py:128:161: E501 line too long (165 > 160 characters)

click here for bot help

@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html playbook/base playbook/helpers playbook/included_file playbook/task stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Sep 2, 2017
@jchristi
Copy link
Contributor

Would love to have working relative paths. Can someone resolve the merge conflicts?

@ansibot ansibot added bug This issue/PR relates to a bug. and removed bugfix_pull_request labels Mar 2, 2018
@ansibot ansibot added pre_azp This PR was last tested before migration to Azure Pipelines. and removed stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Feb 9, 2021
@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html and removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html labels Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects_2.4 This issue/PR affects Ansible v2.4 bug This issue/PR relates to a bug. c:playbook/base c:playbook/helpers c:playbook/included_file c:playbook/task has_issue needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html playbook/base playbook/helpers playbook/included_file playbook/task pre_azp This PR was last tested before migration to Azure Pipelines. support:core This issue/PR relates to code supported by the Ansible Engineering Team. WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ansible 2.0 not respecting relative paths in include + copy
4 participants