-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
requirements.yml is ignored on project sync #8977
Comments
just my 5cents, but as far as i remember requirements are synced only on job execution. Sio you have to trigger a job from a template, and then awx will pull the requirements. Syncing project skips it. |
I think it needs to be synced with the project, otherwise i get the following error when trying to run templates:
|
You have in your role meta https://github.com/al-lac/ansible-role-chrony/blob/master/meta/main.yml So it can't obviously find it. |
Ah yeah i am not using that repository. I am using my gitlab server for that. I changed both repositories to use my gitlab server now, changed the name in meta and requirements.yml. But still get the same error. |
Can confirm this behaviour. It gets skipped on project sync and when starting a job it also will fail with the same error message as shown above. |
Hi @KornKalle, what is the last version it worked for you? I also tried it with version 15 and got the same behaviour. |
Last working Version for me was 11.1.0 |
We are using 15.0.1 (started with 1.0) and it was always working. I've just spun up clean 15.0.1 in vagrant, and added https://gitlab.iamroot.at/root/ansible-base-roles/ as a project, and run a template with ansible-role-chrony.yml playbook, targeting localhost and it downloaded chrony role and started executing it. |
I just added the project and template exactly like you did on one of our 15.0.1 instances. I still get the error that the role was not found when starting the template. We used the docker compose install method for this server. |
Same still for me. It was still working pre-upgrade on 11.1.0, so I would rather like to get some information how we can reproduce this behavior. |
From 15.0 onwards, there has been a change made to how the sync works (instead of global to per-org), by default an org has no credentials hence it does not honor requirements.yml, you might want to try creating a dummy galaxy credential (it's required even if you don't use galaxy) and associating it to your org via the API as mentioned here #8341 |
@constreference thanks a lot! That solved it for me. I had to create a new (dummy) galaxy credential and associate it with my org via the api. Get galaxy credential: GET /api/v2/credentials/?credential_type__kind=galaxy
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 11,
"type": "credential",
"url": "/api/v2/credentials/11/",
"related": {
"created_by": "/api/v2/users/8/",
"modified_by": "/api/v2/users/8/",
"organization": "/api/v2/organizations/2/", Associate galaxy credential to org (returns 204 on success): POST /api/v2/organizations/2/galaxy_credentials/
{
"id": 11,
"associate": true
} This change should really be better documented somewhere. An option to do the association via the UI should be implemented soon as well. |
@ryanpetrello can you review the solution here and triage this issue? This could go in a couple directions ui_next/installer/etc. |
@AlanCoding yep, the need to explicitly associate a public Galaxy credential is a change we made in a recent version of awx - and @al-lac's comment is an example of how to do that correctly.
It's explicitly called out as the top line item in the awx changelog for the version where this changed: |
Duplicate of #8341, see #8341 (comment) |
ISSUE TYPE
SUMMARY
ENVIRONMENT
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
ADDITIONAL INFORMATION
I tried to sync a repository with a requirements.yml and it is always skipped. Tried it with different AWX Versions (15.0.1, 16.0) and different git repos (Bitbucket, Gitlab, GitHub). Maybe the format of my requirements.yml is wrong, but doing a ansible-galaxy command on the awx server works just fine.
requirements.yml:
or:
The text was updated successfully, but these errors were encountered: