mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 14:20:22 -07:00
Port from plaform.dist to ansible.module_utils.distro.linux_distribution
ci_complete
This commit is contained in:
parent
be65d9cfe5
commit
61b1daa65f
10 changed files with 248 additions and 114 deletions
|
@ -46,7 +46,6 @@ EXAMPLES = '''
|
|||
# }
|
||||
'''
|
||||
|
||||
import platform
|
||||
|
||||
HAVE_XENAPI = False
|
||||
try:
|
||||
|
@ -55,6 +54,7 @@ try:
|
|||
except ImportError:
|
||||
pass
|
||||
|
||||
from ansible.module_utils import distro
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
|
||||
|
@ -70,8 +70,7 @@ class XenServerFacts:
|
|||
|
||||
@property
|
||||
def version(self):
|
||||
# Be aware! Deprecated in Python 2.6!
|
||||
result = platform.dist()[1]
|
||||
result = distro.linux_distribution()[1]
|
||||
return result
|
||||
|
||||
@property
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue