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

oci-env LDAP and Keycloak test fix #2406

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

jerabekjiri
Copy link
Contributor

@jerabekjiri jerabekjiri commented Jan 15, 2025

test_ansible_lint_exception_AAH_2606 failing with creating ~/.ansible/roles and permission issues in ldap and keycloak profile.

Importing with galaxy-importer 0.4.27
Getting doc strings via ansible-doc
Finding content inside collection
Loading role docker_role
Linting collection via ansible-lint...
Traceback (most recent call last):
    File "/usr/lib64/python3.11/pathlib.py", line 1116, in mkdir
    os.mkdir(self, mode)
    FileNotFoundError: [Errno 2] No such file or directory: \'/.ansible/roles\'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
    File "/usr/local/bin/ansible-lint", line 8, in <module>
    sys.exit(_run_cli_entrypoint())
    ^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/site-packages/ansiblelint/__main__.py", line 408, in _run_cli_entrypoint
    sys.exit(main(sys.argv))
    ^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/site-packages/ansiblelint/__main__.py", line 290, in main
    cache_dir_lock = initialize_options(argv[1:])
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/site-packages/ansiblelint/__main__.py", line 141, in initialize_options
    options.cache_dir = get_cache_dir(pathlib.Path(options.project_dir))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/site-packages/ansible_compat/prerun.py", line 27, in get_cache_dir
    (cache_dir / name).mkdir(parents=True, exist_ok=True)
    File "/usr/lib64/python3.11/pathlib.py", line 1120, in mkdir
    self.parent.mkdir(parents=True, exist_ok=True)
    File "/usr/lib64/python3.11/pathlib.py", line 1116, in mkdir
    os.mkdir(self, mode)
    PermissionError: [Errno 13] Permission denied: \'/.ansible\'
    
    ...ansible-lint run complete
    Ignore files skip ansible-test sanity tests, found ignore-2.10.txt with 1 statement(s)
    Collection loading complete

@jerabekjiri jerabekjiri changed the title [WIP] TEST CI oci-env LDAP and Keycloak test fix Jan 16, 2025
Copy link
Collaborator

@jctanner jctanner left a comment

Choose a reason for hiding this comment

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

Approving, but noting that we want to fix this by defining an isolated temporary directory in galaxy-importer for ansible-lint to use

@jerabekjiri jerabekjiri merged commit fde43ff into ansible:master Jan 17, 2025
19 of 21 checks passed
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.

2 participants