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

Check ANSIBLE_ROLES_PATH before basedir #478

Merged

Conversation

pilou-
Copy link
Contributor

@pilou- pilou- commented Feb 6, 2019

Check ANSIBLE_ROLES_PATH directories before basedir.

The two commands below should report the same output:

  • cd test && ansible-lint roles/test-role
  • cd test/roles/test-role && ANSIBLE_ROLES_PATH=.. ansible-lint molecule/default/include-import-role.yml (this is the way molecule calls ansible-lint)
    but only the first checks tasks inside the test-role role.

This regression has been introduced by 88e9114 which have been included in v4.0.0a0.

Unit test included.

Fix ansible/molecule#1723.

'roles' doesn't seem an adequate toplevel name when testing three
directories depth.

Signed-off-by: Pierre-Louis Bonicoli <pierre-louis.bonicoli@libregerbil.fr>
Signed-off-by: Pierre-Louis Bonicoli <pierre-louis.bonicoli@libregerbil.fr>
Fix behavior when ANSIBLE_ROLES_PATH is defined, for example:

    cd test/roles/test-role
    ANSIBLE_ROLES_PATH=.. ansible-lint molecule/default/include-import-role.yml

Fix ansible/molecule#1723

Signed-off-by: Pierre-Louis Bonicoli <pierre-louis.bonicoli@libregerbil.fr>
@pilou- pilou- changed the title Check ANSIBLE_ROLES_PATH before basedir WIP: Check ANSIBLE_ROLES_PATH before basedir Feb 6, 2019
@pilou-
Copy link
Contributor Author

pilou- commented Feb 6, 2019

I will push the 3rd commit (the bugfix) once the Travis build result is available (failure expected).

@pilou- pilou- changed the title WIP: Check ANSIBLE_ROLES_PATH before basedir Check ANSIBLE_ROLES_PATH before basedir Feb 6, 2019
@gundalow gundalow modified the milestone: 4.1.0 Feb 6, 2019
@awcrosby awcrosby merged commit 10325b4 into ansible:master Feb 7, 2019
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

3 participants