You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I run ansible-lint before publishing a collection into my Galaxy-NG.
Even if ansible-lint doesn't detect errors or warnings, the publish process shows warning about dependencies.
ansible-lint should warn me if Galaxy-NG has something else to claim.
Issue Type
Bug Report
OS / ENVIRONMENT
# ansible-lint --versionansible-lint 24.2.0 using ansible-core:2.16.2 ansible-compat:4.1.11 ruamel-yaml:0.18.5 ruamel-yaml-clib:0.2.8
# Galaxy-NG Server version [4.9.1 ]Pulp Ansible Version [0.20.3 ]Pulp Container Version [2.15.4 ]Pulp Core Version [3.28.23 ]Galaxy Importer [0.4.20]
ansible installation method: pip
ansible-lint installation method: pip
STEPS TO REPRODUCE
Let suppose I developed a collection with a playbook that use an external role:
playbooks/myOS.yml:
[...]
roles:
- arillso.logrotate
Also, let suppose the collection has dependecies in galaxy.yml:
In my local environment I have installed all standalone roles and collections required.
Then:
# cd /path/to/collection
# ansible-lintPassed: 0 failure(s), 0 warning(s) on 149 files. Last profile that met the validation criteria was 'production'.
# ansible-galaxy collection build
This is all fine. But when I try to publish on Galaxy-NG I see new unexpected warnings:
# ansible-galaxy collection publish --server myserver <collection_name>-1.0.0.tar.gz[...][WARNING]: Galaxy import warning message: playbooks/myOS.yml:300:7: syntax-check[specific]: the role 'arillso.logrotate' was not found [WARNING]: Galaxy import warning message: roles/dnf_automatic_notifier/tasks/main.yml:9:3: syntax-check[specific]: couldn't resolve module/action 'community.general.ini_file'. This often indicates a misspelling, missing collection, or incorrect module path.[WARNING]: Galaxy import warning message: roles/hostnamectl/tasks/main.yml:4:3: syntax-check[specific]: couldn't resolve module/action 'community.docker.current_container_facts'. This often indicates a misspelling, missing collection, or incorrect modulepath.[WARNING]: Galaxy import warning message: roles/journald/tasks/main.yml:12:3: syntax-check[specific]: couldn't resolve module/action 'community.general.ini_file'. This often indicates a misspelling, missing collection, or incorrect module path.[WARNING]: Galaxy import warning message: roles/rhsub/tasks/main.yml:14:3: syntax-check[specific]: couldn't resolve module/action 'community.general.redhat_subscription'. This often indicates a misspelling, missing collection, or incorrect module path.
I can't fix these warnings. I tried to sync remote required collections in Galaxy-NG, but it has no effect.
Desired Behavior
# ansible-galaxy collection publish --server myserver <collection_name>-1.0.0.tar.gzPublishing collection artifact '/root/.ansible/collections/ansible_collections/...Collection has been published to the Galaxy server ...Waiting until Galaxy import task ... has completedCollection has been successfully published and imported to the Galaxy server ...
Actual Behavior
Publishing collection artifact ...Collection has been published to the Galaxy server ...Waiting until Galaxy import task .... has completed[WARNING]: Galaxy import warning message: playbooks/myOS.yml:300:7: syntax-check[specific]: the role 'arillso.logrotate' was not found in...[WARNING]: Galaxy import warning message: roles/dnf_automatic_notifier/tasks/main.yml:9:3: syntax-check[specific]: couldn't resolve module/action 'community.general.ini_file'. This often indicates a misspelling, missing collection, or incorrect module path.[WARNING]: Galaxy import warning message: roles/hostnamectl/tasks/main.yml:4:3: syntax-check[specific]: couldn't resolve module/action 'community.docker.current_container_facts'. This often indicates a misspelling, missing collection, or incorrect modulepath.[WARNING]: Galaxy import warning message: roles/journald/tasks/main.yml:12:3: syntax-check[specific]: couldn't resolve module/action 'community.general.ini_file'. This often indicates a misspelling, missing collection, or incorrect module path.[WARNING]: Galaxy import warning message: roles/rhsub/tasks/main.yml:14:3: syntax-check[specific]: couldn't resolve module/action 'community.general.redhat_subscription'. This often indicates a misspelling, missing collection, or incorrect module path.Collection has been successfully published and imported to the Galaxy server ...
The Galaxy importer does not install dependencies before extracing docs or running ansible-lint. This causes a lot of errors/warnings that shouldn't be there.
@ssbarnea I wonder if this will be solved by upgrading the ansible-lint dependency. If not, IMO this is definitely something worth opening an issue for on galaxy-importer, especially when seeing the similar docs issue related to dependencies.
Summary
I run
ansible-lint
before publishing a collection into my Galaxy-NG.Even if
ansible-lint
doesn't detect errors or warnings, the publish process shows warning about dependencies.ansible-lint
should warn me if Galaxy-NG has something else to claim.Issue Type
OS / ENVIRONMENT
STEPS TO REPRODUCE
Let suppose I developed a collection with a playbook that use an external role:
playbooks/myOS.yml:
Also, let suppose the collection has dependecies in galaxy.yml:
In my local environment I have installed all standalone roles and collections required.
Then:
This is all fine. But when I try to publish on Galaxy-NG I see new unexpected warnings:
I can't fix these warnings. I tried to sync remote required collections in Galaxy-NG, but it has no effect.
Desired Behavior
Actual Behavior
See also at the forum thread.
The text was updated successfully, but these errors were encountered: