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

Declare grafana.grafana collection dependencies on galaxy.yml #222

Open
kysrpex opened this issue Jun 12, 2024 · 1 comment
Open

Declare grafana.grafana collection dependencies on galaxy.yml #222

kysrpex opened this issue Jun 12, 2024 · 1 comment

Comments

@kysrpex
Copy link

kysrpex commented Jun 12, 2024

Hello!

I have encountered the following issue while running the role grafana.grafana.grafana.

TASK [grafana.grafana.grafana : Datasources] ************************************************************************************************************************************
ERROR! couldn't resolve module/action 'community.grafana.grafana_datasource'. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in '/home/.../collections/ansible_collections/grafana/grafana/roles/grafana/tasks/datasources.yml': line 2, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

---
- name: "Ensure datasources exist (via API)"
  ^ here

Link to the offending line.

The reason is clear: the collection community.grafana is missing. As far as I understand from the presence of a requirements.yml file in the repository, the collections community.general, community.grafana and ansible.posix are dependencies of the collection grafana.grafana. Installing community.grafana fixes the issue.

However, would it not make sense to use the dependencies key of the galaxy.yml file, as the Ansible documentation explains?

@kysrpex kysrpex changed the title Declare grafana.grafana collection dependencies Declare grafana.grafana collection dependencies on galaxy.yml Jun 12, 2024
@ishanjainn
Copy link
Member

@gardar Why do we have that dependency? Last I checked it was just for CI?

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

2 participants