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

AWX sync not possible - Illegal filename .. #259

Closed
ropitz-wago opened this issue Oct 9, 2023 · 5 comments
Closed

AWX sync not possible - Illegal filename .. #259

ropitz-wago opened this issue Oct 9, 2023 · 5 comments

Comments

@ropitz-wago
Copy link

After an update to the newest AWX execution environment we can't sync your repo via requirements.txt in a project anymore.

Error Message:

- extracting willshersystems.sshd to /var/lib/awx/.../stage/requirements_roles/willshersystems.sshd
[WARNING]: Illegal filename '..': '..' is not allowed
ERROR! Unexpected Exception, this is probably a bug: join() missing 1 required positional argument: 'a'

Solution:
We forked you repo and deleted the symlink and it works now.

ansible-sshd/tests/roles$ ls -l
lrwxrwxrwx 1 root root 6  9. Okt 10:55 ansible-sshd -> ../../
@jose-d
Copy link

jose-d commented Oct 9, 2023

as noted here, #176 (comment), this role is part of collection fedora.linux_system_roles.

From my knowledge of AWX it's cleaner to use the collection instead of manually installing roles.

@hv15
Copy link

hv15 commented Oct 11, 2023

@ropitz-wago what version of ansible are you using, with ansible-core 2.15.5 symlinks in roles are no longer allowed, see https://github.com/ansible/ansible/blob/v2.15.5/changelogs/CHANGELOG-v2.15.rst#id20.

EDIT: opened up seperate issue for this: #260

@ropitz-wago
Copy link
Author

@hv15, I know, that's why I opened the issue. In this role (repo) there is a symlink and it's unuseable.

@richm
Copy link
Collaborator

richm commented Oct 11, 2023

I think the problem is that the symlink causes a recursive path. The tests/roles symlink is needed because of the way we run integration tests from the tests/ directory. We had the same problem with other linux-system-roles. The solution is to create a directory tests/roles/ansible-sshd/ and in this directory create symlinks to the role subdirectories - ../../../tasks/, ../../../defaults/, ../../../vars, etc. That way, the symlinks won't be recursive.

@mattwillsher
Copy link
Member

Closing in favour of #260 . Thank you for the report.

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

No branches or pull requests

5 participants