feature: support both upstream/downstream system_roles collections#187
feature: support both upstream/downstream system_roles collections#187djdanielsson merged 9 commits intoredhat-cop:mainfrom
Conversation
|
I think I created the new files with CRLF eol's, and that caused the CI failures (at least the linting one). Will verify later and report back. |
|
That's what I get for writing Ansible in multiple places. Converted the new files from CRLF to LF line endings. |
I should have approved the tests first. I meant to but then I got sidetracked. |
|
@Denney-tech, I fixed the requirements.yml file, I'll let you fix the linting. Once it passes lint I'm back to LGTM. |
|
Thank you. Will look at it tomorrow. |
|
LGTM. I pulled this PR and tested both ways and confirmed it does use the specified collection. @djdanielsson - Do you want to double check since it does have implications on the pipeline? |
|
Idk a great way to test it without just merging it to run it through the pipeline. If it works outside of that it should work in the pipeline fine. I don't love this way but I also don't know if a better way to do it. |
|
@Denney-tech Few more lint issues. I must have missed the run test button again. |
Yeah, but I can see a time where using the rhel_system_roles could be a requirement, so I think it's good functionality to have. I vote we try it. |
|
@jeffmcutter Hopefully that's the last of the linting issues. I'm going to move my local so I'm not writing ansible in multiple places and can actually lint the code before I commit here. |
|
@djdanielsson Seems like something with the latest version of ansible-lint? Linting of this PR passes on my system: Says it's on a dev build? |
|
It's not failing due to ansible lint it's failing because one of the files is missing a blank line at the end of the file |
|
@djdanielsson You mean the previous run? I already fixed the missing new lines (that's my commit message in @jeffmcutter's snippet). This last run is using a preview release of ansible-lint (24.2.4.dev10) for some reason instead of the most recent tagged release of 24.2.3. The actual error we're seeing is with |
|
It's ansible-lint: https://ansible.readthedocs.io/projects/lint/rules/yaml/#yamllint-configuration Introduced here: which is post 24.2.3 release. ansible/ansible-lint@d910de0 Working on a fix. |
|
Added missing requirements, but unable to upgrade ansible-lint to test locally as my work's internal pypi mirror is stale. Time to put in a support ticket... |
|
At last we have passed lint. :-) @djdanielsson Can you do the honors? |
The crypto_policies role called by the upgrade role can dynamically reference the collection source. The changes in this PR are based on what I found in the redhat.sap_install/community.sap_install collections.
Adds
infra_leapp_upgrade_system_roles_collectionand defaults tofedora.linux_system_roles, and includes an arguement_spec.yml for ensuring that only that collection andredhat.rhel_system_rolescan be referenced this way.This PR should close the existing draft: #136
I consider this to be a minor change as no existing behavior should change.
However, there is a major change in order to pre-emptively fix the CI workflows.
All of the dependencies are moved from galaxy.yml to requirements.yml, and the ansible-lint workflow now installs dependencies directly from the requirements file in anticipation of this. Removing the dependencies may have an impact to customer pipelines that relied on it, but that can be easily fixed by adding the dependencies. The end result is this makes the fedora.linux_system_roles optional.
Final thoughts
The sap_install collection I referenced does not have any hard collection dependencies upstream on galaxy.ansible.com, but they do downstream on automation-hub which requires redhat.rhel_system_roles. They are in different namespaces, so I don't know how they handle that workflow or whether or not it would make any sense to do something similar for infra.leapp to build with different dependencies for galaxy/automation-hub.