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

"Failed to find playbook" error when importing a playbook from a collection #4362

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

"Failed to find playbook" error when importing a playbook from a collection #4362

acidroper opened this issue Oct 9, 2024 · 1 comment · May be fixed by #4369
Assignees
Labels

Comments

@acidroper
Copy link

acidroper commented Oct 9, 2024

Summary

When using import_playbook with a playbook from a collection, ansible-lint reports the following error:

ERROR    Failed to find my_namespace.my_collection.playbook playbook.
Issue Type
  • Bug Report
OS / ENVIRONMENT
ansible-lint --version
ansible-lint 24.9.2 using ansible-core:2.16.11 ansible-compat:24.9.1 ruamel-yaml:0.18.6 ruamel-yaml-clib:0.2.8
  • ansible installation method: pip
  • ansible-lint installation method: pip
STEPS TO REPRODUCE

Write a playbook that imports a playbook from an installed collection:

---
- name: Import a playbook
  ansible.builtin.import_playbook: my_namespace.my_collection.playbook

Run ansible-lint import_playbook.yml

Desired Behavior

No errors are expected.

Actual Behavior
$ ansible-lint import_playbook.yml
ERROR    Failed to find my_namespace.my_collection.playbook playbook.

Passed: 0 failure(s), 0 warning(s) on 1 files. Last profile that met the validation criteria was 'production'.

$ ls -l ~/.ansible/collections/ansible_collections/my_namespace/my_collection/playbooks/playbook.yml
-rw-r--r-- 1 user user 187 окт  9 10:42 /home/user/.ansible/collections/ansible_collections/my_namespace/my_collection/playbooks/playbook.yml
@acidroper acidroper added bug new Triage required labels Oct 9, 2024
@cavcrosby
Copy link
Contributor

I've started looking into this issue, would appreciate it if I could be assigned to it. @ssbarnea

@Qalthos Qalthos removed the new Triage required label Oct 16, 2024
cavcrosby added a commit to cavcrosby/ansible-lint that referenced this issue Oct 17, 2024
Parsing import_playbook children has been moved to its own function to
to deal with pylint's too-many-locals violation when cramming everything
into the include_children function.
@cavcrosby cavcrosby linked a pull request Oct 17, 2024 that will close this issue
cavcrosby added a commit to cavcrosby/ansible-lint that referenced this issue Oct 18, 2024
Parsing import_playbook children has been moved to its own function to
to deal with pylint's too-many-locals violation when cramming everything
into the include_children function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

3 participants