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

Move to fileglob loop for yml requirement locations #9945

Merged
merged 2 commits into from
Apr 22, 2021

Conversation

AlanCoding
Copy link
Member

SUMMARY

Overdue followup on #8312

I knew there was more research needed, but didn't know what form it would take until I got my hands dirty.

This entails a look and feel change.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME
  • API
ADDITIONAL INFORMATION

Screenshot from 2021-04-19 15-46-47

It has a warning... but I don't dislike it.

- "{{project_path|quote}}/collections/requirements.yaml"
- "{{project_path|quote}}/collections/requirements.yml"
- "{{project_path|quote}}/requirements.yaml"
- "{{project_path|quote}}/requirements.yml"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@geerlingguy with #106 in mind, am I getting hotter or colder?

Did Ansible itself roll out a combined ansible-galaxy install command that handled both collections and roles? If it did, then using that for the top-level requirements would be preferable.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was thinking about ansible/ansible#67843 by @jborean93

and after reading back over that, I believe there's nothing we can really use from it. We still support Ansible 2.9 (which doesn't have the combined command), and we have to specify the roles path, which isn't compatible with the combined roles & collections install command.

So I think this answers the question for me - we have to keep using ansible-galaxy role/collection install forever.

Now I'm questioning if we should install roles from {{project_path|quote}}/requirements.yaml or not.

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

Copy link
Member

@thedoubl3j thedoubl3j left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look good to me @AlanCoding bringing it down to 2 tasks will make future edits easier and create less bloat.

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 88f7025 into ansible:devel Apr 22, 2021
@fourstepper
Copy link

Is this backwards compatible? I am having some issues with a project that has the requirements in the roles/ directory

@AlanCoding
Copy link
Member Author

yeah, it should be completely backward compatible. If you have some details we'll be interested.

@fourstepper
Copy link

I am getting the following warning when fetching the requirements, could it be related?:

https://paste.sr.ht/~fourstepper/8dd481a03cc7389350409efdef37f5908661cdcf

@AlanCoding
Copy link
Member Author

No, that's expected. The aesthetics of it are a drawback of this method. All its saying is that you don't have the collections/ folder, and it was in the list that was searched for. If you have stuff in roles/, that task isn't even relevant to you. There's a different task that is expected to install roles.

@fourstepper
Copy link

Yeah, my bad. Everything is working fine

@AlanCoding AlanCoding deleted the fileglob branch June 23, 2021 18:14
dark-vex added a commit to dark-vex/infra-cd that referenced this pull request Aug 8, 2022
Tower/AWX reads only from <root-project-folder/roles, see: ansible/awx#106 and ansible/awx#9945

Signed-off-by: Daniele De Lorenzi <daniele.delorenzi@fastnetserv.net>
dark-vex added a commit to dark-vex/infra-cd that referenced this pull request Aug 8, 2022
[Ansible] Workaround for Ansible Tower/AWX.
Tower/AWX reads only from <root-project-folder>/roles/requirements.yml, see:
ansible/awx#106
ansible/awx#9945

Signed-off-by: Daniele De Lorenzi <daniele.delorenzi@fastnetserv.net>
dark-vex added a commit to dark-vex/infra-cd that referenced this pull request Aug 8, 2022
[Ansible] Workaround for Ansible Tower/AWX.
Tower/AWX reads only from <root-project-folder>/roles/requirements.yml, see:
ansible/awx#106
ansible/awx#9945

Signed-off-by: Daniele De Lorenzi <daniele.delorenzi@fastnetserv.net>
dark-vex added a commit to dark-vex/infra-cd that referenced this pull request Aug 8, 2022
[Ansible] Workaround for Ansible Tower/AWX.
Tower/AWX reads only from <root-project-folder>/roles/requirements.yml, see:
ansible/awx#106
ansible/awx#9945

Signed-off-by: Daniele De Lorenzi <daniele.delorenzi@fastnetserv.net>
dark-vex added a commit to dark-vex/infra-cd that referenced this pull request Aug 12, 2022
Tower/AWX reads only from /roles/requirements.yml.
Due to this it fails to install roles requirements.yml, reference:
ansible/awx#106
ansible/awx#9945

So we just reference the playbooks via git submodule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants