added debug messages and debugging now doesn't make changes in start and stop

modified:   docker.py
This commit is contained in:
Ronny Abraham 2016-11-16 12:53:56 +02:00
parent 34e887e890
commit 84cfeb8072

View file

@ -99,6 +99,11 @@ def generate():
logger.debug("upload_msg : %s" % upload_msg)
import pprint
pp = pprint.PrettyPrinter(indent=4)
print "context:\n"
pp.pprint(context)
else:
config_src = configuration.templates.docker.database.src
@ -170,7 +175,10 @@ def start(create=False):
docker_start = 'docker start %s' % \
configuration.docker.database.container_name
docker_run(docker_start)
if env.debug:
print "docker_run(%s)" % docker_start
else:
docker_run(docker_start)
@task
@ -193,7 +201,12 @@ def stop(remove=False):
docker_rm = 'docker rm %s' % configuration.docker.database.container_name
docker_run(docker_stop)
if env.debug:
print "docker_run(%s)" % docker_stop
print "docker_run(%s)" % docker_rm
if remove:
docker_run(docker_rm)
else:
docker_run(docker_stop)
if remove:
docker_run(docker_rm)