|
|
@ -425,9 +425,10 @@ def main():
|
|
|
|
out = ''
|
|
|
|
out = ''
|
|
|
|
|
|
|
|
|
|
|
|
env = module.params['virtualenv']
|
|
|
|
env = module.params['virtualenv']
|
|
|
|
|
|
|
|
venv_created = False
|
|
|
|
if env:
|
|
|
|
if env:
|
|
|
|
if not os.path.exists(os.path.join(env, 'bin', 'activate')):
|
|
|
|
if not os.path.exists(os.path.join(env, 'bin', 'activate')):
|
|
|
|
|
|
|
|
venv_created = True
|
|
|
|
if module.check_mode:
|
|
|
|
if module.check_mode:
|
|
|
|
module.exit_json(changed=True)
|
|
|
|
module.exit_json(changed=True)
|
|
|
|
|
|
|
|
|
|
|
@ -566,6 +567,8 @@ def main():
|
|
|
|
_, out_freeze_after, _ = _get_packages(module, pip, chdir)
|
|
|
|
_, out_freeze_after, _ = _get_packages(module, pip, chdir)
|
|
|
|
changed = out_freeze_before != out_freeze_after
|
|
|
|
changed = out_freeze_before != out_freeze_after
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
changed = changed or venv_created
|
|
|
|
|
|
|
|
|
|
|
|
module.exit_json(changed=changed, cmd=cmd, name=name, version=version,
|
|
|
|
module.exit_json(changed=changed, cmd=cmd, name=name, version=version,
|
|
|
|
state=state, requirements=requirements, virtualenv=env,
|
|
|
|
state=state, requirements=requirements, virtualenv=env,
|
|
|
|
stdout=out, stderr=err)
|
|
|
|
stdout=out, stderr=err)
|
|
|
|