Merge remote-tracking branch 'upstream/devel' into devel
This commit is contained in:
commit
95228ba40f
2 changed files with 8 additions and 6 deletions
10
get_url
10
get_url
|
@ -101,11 +101,13 @@ def url_do_get(module, url, dest):
|
|||
info = dict(url=url, dest=dest)
|
||||
r = None
|
||||
parsed = urlparse.urlparse(url)
|
||||
if '@' in parsed.netloc:
|
||||
credentials = parsed.netloc.split('@')[0]
|
||||
if '@' in parsed[1]:
|
||||
credentials, netloc = parsed[1].split('@', 1)
|
||||
if ':' in credentials:
|
||||
username, password = credentials.split(':')
|
||||
netloc = parsed.netloc.split('@')[1]
|
||||
username, password = credentials.split(':', 1)
|
||||
else:
|
||||
username = credentials
|
||||
password = ''
|
||||
parsed = list(parsed)
|
||||
parsed[1] = netloc
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ def main():
|
|||
|
||||
SUPERVISORCTL = module.get_bin_path('supervisorctl', True)
|
||||
|
||||
rc, out, err = module.run_command('%s status' % supervisorctl)
|
||||
rc, out, err = module.run_command('%s status' % SUPERVISORCTL)
|
||||
present = name in out
|
||||
|
||||
if state == 'present':
|
||||
|
@ -73,7 +73,7 @@ def main():
|
|||
|
||||
module.exit_json(changed=False, name=name, state=state)
|
||||
|
||||
rc, out, err = module.run_command('%s status %s' % (supervisorctl, name))
|
||||
rc, out, err = module.run_command('%s status %s' % (SUPERVISORCTL, name))
|
||||
running = 'RUNNING' in out
|
||||
|
||||
if running and state == 'started':
|
||||
|
|
Loading…
Reference in a new issue