This is a follow-up to the issue Finding unmaintained collections in Ansible on GitHub.
unchanged-dependencies.py 9.0.0 7.0.0
:
- community.azure Remove community.azure from Ansible 10
- community.rabbitmq There has been a new release Apr 1
- gluster.gluster Remove gluster.gluster from Ansible 10
- hpe.nimble Remove hpe.nimble from Ansible 10
- ibm.qradar There has been a new release Dec 1
- inspur.sm Remove inspur.sm from Ansible 11
- netapp.elementsw Remove netapp.elementsw from Ansible 10
- netapp.storagegrid Remove netapp.storagegrid from Ansible 11
- splunk.es There has been a new release Nov 17
unchanged-dependencies.py
:
#!/usr/bin/python
# coding: utf-8
# Author: Mario Lenz <m@riolenz.de>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: Ansible Project, 2022
"""Show unchanged dependencies between Ansible versions."""
import argparse
def get_dependencies(version):
dependencies = {}
major_version = version.split('.')[0]
with open('%s/ansible-%s.deps' % (major_version, version)) as f:
for line in f:
dependency = line.strip().split(':')
dependencies[dependency[0]] = dependency[1].strip()
return dependencies
def compare_dependencies(dependencies1, dependencies2):
for dependency in dependencies1:
if dependency in dependencies2:
if dependencies1[dependency] == dependencies2[dependency]:
print(dependency)
def main():
parser = argparse.ArgumentParser(description='Show unchanged dependencies between Ansible versions.')
parser.add_argument('version1', help='first version for the comparison')
parser.add_argument('version2', help='second version for the comparison')
args = parser.parse_args()
dependencies1 = get_dependencies(args.version1)
dependencies2 = get_dependencies(args.version2)
compare_dependencies(dependencies1, dependencies2)
if __name__ == '__main__':
main()