diff options
author | Lee Garrett <lgarrett@rocketjump.eu> | 2022-12-13 16:16:06 +0100 |
---|---|---|
committer | Lee Garrett <lgarrett@rocketjump.eu> | 2022-12-13 16:16:06 +0100 |
commit | 46bbbf9f8e527b7ab4329a0aa16e3d38bfbb0c13 (patch) | |
tree | c4925ce2c3e7691925ebd7cbc4706707cdfcd86f /lib/ansible/galaxy | |
parent | a6f601d820bf261c5f160bfcadb7ca6aa14d6ec2 (diff) | |
download | debian-ansible-core-46bbbf9f8e527b7ab4329a0aa16e3d38bfbb0c13.zip |
New upstream version 2.14.1
Diffstat (limited to 'lib/ansible/galaxy')
-rw-r--r-- | lib/ansible/galaxy/role.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/ansible/galaxy/role.py b/lib/ansible/galaxy/role.py index 7a13c971..99bb525e 100644 --- a/lib/ansible/galaxy/role.py +++ b/lib/ansible/galaxy/role.py @@ -33,6 +33,7 @@ from shutil import rmtree from ansible import context from ansible.errors import AnsibleError, AnsibleParserError +from ansible.galaxy.api import GalaxyAPI from ansible.galaxy.user_agent import user_agent from ansible.module_utils._text import to_native, to_text from ansible.module_utils.common.yaml import yaml_dump, yaml_load @@ -63,7 +64,7 @@ class GalaxyRole(object): display.debug('Validate TLS certificates: %s' % self._validate_certs) self.galaxy = galaxy - self.api = api + self._api = api self.name = name self.version = version @@ -104,6 +105,12 @@ class GalaxyRole(object): return self.name == other.name @property + def api(self): + if not isinstance(self._api, GalaxyAPI): + return self._api.api + return self._api + + @property def metadata(self): """ Returns role metadata |