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

lsr_role2collection.py does not support main.yaml files in roles #355

Open
hhenkel opened this issue Oct 9, 2024 · 1 comment · May be fixed by #356
Open

lsr_role2collection.py does not support main.yaml files in roles #355

hhenkel opened this issue Oct 9, 2024 · 1 comment · May be fixed by #356

Comments

@hhenkel
Copy link

hhenkel commented Oct 9, 2024

I was facing an issue when I tried to use the lsr_role2collection.py with a role, that uses a main.yaml file in tasks instead of a main.yml.

@hhenkel
Copy link
Author

hhenkel commented Oct 9, 2024

This is the error message for me without the patch:

DEBUG:root:/home/hhenkel/venvs/ansible-navigator/bin/python3 lsr_role2collection.py --src-owner linux-system-roles --role authorized_keys --src-path /tmp/collection90iw3afc.lsr --dest-path /tmp/ansible-collection
 --namespace my_corp --collection linux_base --subrole-prefix private_authorized_keys_subrole_ --readme lsr_role2collection/collection_readme.md returned 2 stdout  stderr ERROR:root:Neither /tmp/collection90iw3a
fc.lsr/authorized_keys nor /tmp/collection90iw3afc.lsr is a role top directory.

Traceback (most recent call last):
  File "/home/hhenkel/git/github/linux-system-roles/auto-maintenance/./release_collection.py", line 1089, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/hhenkel/git/github/linux-system-roles/auto-maintenance/./release_collection.py", line 1075, in main
    update_collection(args, galaxy, coll_rel)
  File "/home/hhenkel/git/github/linux-system-roles/auto-maintenance/./release_collection.py", line 662, in update_collection
    role_to_collection(
  File "/home/hhenkel/git/github/linux-system-roles/auto-maintenance/./release_collection.py", line 434, in role_to_collection
    _ = run_cmd(cmd)
        ^^^^^^^^^^^^
  File "/home/hhenkel/git/github/linux-system-roles/auto-maintenance/./release_collection.py", line 138, in run_cmd
    raise subprocess.CalledProcessError(
subprocess.CalledProcessError: Command '['/home/hhenkel/venvs/ansible-navigator/bin/python3', 'lsr_role2collection.py', '--src-owner', 'linux-system-roles', '--role', 'authorized_keys', '--src-path', '/tmp/collec
tion90iw3afc.lsr', '--dest-path', '/tmp/ansible-collection', '--namespace', 'my_corp', '--collection', 'linux_base', '--subrole-prefix', 'private_authorized_keys_subrole_', '--readme', 'lsr_role2collection/colle
ction_readme.md']' returned non-zero exit status 2.

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 a pull request may close this issue.

1 participant