mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Removed urlparsing of gemsource. Not needed
This commit is contained in:
parent
637210be1f
commit
6e44c72761
1 changed files with 1 additions and 8 deletions
|
@ -62,7 +62,6 @@ examples:
|
||||||
author: Johan Wiren
|
author: Johan Wiren
|
||||||
'''
|
'''
|
||||||
import re
|
import re
|
||||||
from urlparse import urlparse
|
|
||||||
|
|
||||||
def getinstalledversions(module, remote=False):
|
def getinstalledversions(module, remote=False):
|
||||||
cmd = [ module.get_bin_path('gem', True) ]
|
cmd = [ module.get_bin_path('gem', True) ]
|
||||||
|
@ -149,13 +148,7 @@ def main():
|
||||||
if module.params['gemsource'] and module.params['state'] == 'latest':
|
if module.params['gemsource'] and module.params['state'] == 'latest':
|
||||||
module.fail_json(msg="Cannot maintain state=latest when installing from local source")
|
module.fail_json(msg="Cannot maintain state=latest when installing from local source")
|
||||||
|
|
||||||
if module.params['gemsource']:
|
if module.params['gemsource'] is not 'null':
|
||||||
url=urlparse(module.params['gemsource'])
|
|
||||||
if url.scheme in [ '', 'file' ] :
|
|
||||||
module.params['gemsource'] = url.path
|
|
||||||
else:
|
|
||||||
module.fail_json(msg="Installation using url scheme %s is not supported." % url.scheme)
|
|
||||||
else:
|
|
||||||
module.params['gemsource'] = module.params['name']
|
module.params['gemsource'] = module.params['name']
|
||||||
|
|
||||||
changed = False
|
changed = False
|
||||||
|
|
Loading…
Add table
Reference in a new issue