Commit cc6fc149 by Yeukhon Wong

Merge remote-tracking branch 'upstream/devel' into devel

parents 980ffde1 fabb2a61
...@@ -170,6 +170,8 @@ def _varFind(basedir, text, vars, lookup_fatal, depth=0): ...@@ -170,6 +170,8 @@ def _varFind(basedir, text, vars, lookup_fatal, depth=0):
except errors.AnsibleError: except errors.AnsibleError:
if not lookup_fatal: if not lookup_fatal:
replacement = None replacement = None
else:
raise
else: else:
replacement = None replacement = None
return {'replacement': replacement, 'start': start, 'end': end} return {'replacement': replacement, 'start': start, 'end': end}
......
...@@ -101,11 +101,13 @@ def url_do_get(module, url, dest): ...@@ -101,11 +101,13 @@ def url_do_get(module, url, dest):
info = dict(url=url, dest=dest) info = dict(url=url, dest=dest)
r = None r = None
parsed = urlparse.urlparse(url) parsed = urlparse.urlparse(url)
if '@' in parsed.netloc: if '@' in parsed[1]:
credentials = parsed.netloc.split('@')[0] credentials, netloc = parsed[1].split('@', 1)
if ':' in credentials: if ':' in credentials:
username, password = credentials.split(':') username, password = credentials.split(':', 1)
netloc = parsed.netloc.split('@')[1] else:
username = credentials
password = ''
parsed = list(parsed) parsed = list(parsed)
parsed[1] = netloc parsed[1] = netloc
......
...@@ -58,7 +58,7 @@ def main(): ...@@ -58,7 +58,7 @@ def main():
SUPERVISORCTL = module.get_bin_path('supervisorctl', True) 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 present = name in out
if state == 'present': if state == 'present':
...@@ -73,7 +73,7 @@ def main(): ...@@ -73,7 +73,7 @@ def main():
module.exit_json(changed=False, name=name, state=state) 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 running = 'RUNNING' in out
if running and state == 'started': if running and state == 'started':
......
...@@ -274,7 +274,7 @@ class Ec2Inventory(object): ...@@ -274,7 +274,7 @@ class Ec2Inventory(object):
addressable ''' addressable '''
# Only want running instances # Only want running instances
if instance.state == 'terminated': if instance.state != 'running':
return return
# Select the best destination address # Select the best destination address
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment