path: root/docker
diff options
authorJuan Antonio Osorio Robles <jaosorior@redhat.com>2017-03-16 13:20:41 +0200
committerJuan Antonio Osorio Robles <jaosorior@redhat.com>2017-03-22 10:11:21 +0200
commit7f5c616a949dc1649ac22484d7fd059b04cae6c5 (patch)
treecadbf815eed6cc5b1c383204d7afce580262fb08 /docker
parentb758dff5758a84b8a72766dd2591477f68b23c50 (diff)
docker-puppet: skip empty volume entries
This allows to optionally add volumes, where we could use a heat conditional to either put the volume path we want or put an empty string which should be safely skipped. Change-Id: I68f91ffdd8ceb14735adad1322fcf124c47b160c
Diffstat (limited to 'docker')
1 files changed, 2 insertions, 1 deletions
diff --git a/docker/docker-puppet.py b/docker/docker-puppet.py
index 0f07943..8f95208 100755
--- a/docker/docker-puppet.py
+++ b/docker/docker-puppet.py
@@ -205,7 +205,8 @@ def mp_puppet_config((config_volume, puppet_tags, manifest, config_image, volume
'--volume', '%s:%s:rw' % (sh_script, sh_script) ]
for volume in volumes:
- dcmd.extend(['--volume', volume])
+ if volume:
+ dcmd.extend(['--volume', volume])
dcmd.extend(['--entrypoint', sh_script])