diff --git a/changelogs/fragments/66370-galaxy-add-metadata-property.yaml b/changelogs/fragments/66370-galaxy-add-metadata-property.yaml new file mode 100644 index 00000000000..32ca6495a2d --- /dev/null +++ b/changelogs/fragments/66370-galaxy-add-metadata-property.yaml @@ -0,0 +1,2 @@ +minor_changes: + - CollectionRequirement - Add a metadata property to update and retrieve the _metadata attribute. diff --git a/lib/ansible/galaxy/collection.py b/lib/ansible/galaxy/collection.py index 445cbb24661..00e055d0a90 100644 --- a/lib/ansible/galaxy/collection.py +++ b/lib/ansible/galaxy/collection.py @@ -93,6 +93,11 @@ class CollectionRequirement: def __unicode__(self): return u"%s.%s" % (self.namespace, self.name) + @property + def metadata(self): + self._get_metadata() + return self._metadata + @property def latest_version(self): try: